What is GPX

Garmin GPS

What is GPX

GPX is an exchange format for GPS data. When you connect your GPS to the computer and download a record of your trip, it usually comes in the GPX format. That is a file ending with “.gpx”.

How to use GPX

There is a number of web, mobile or desktop applications, which can work the GPX files and display maps with your GPS tracks. For example, Geofoobar.com will help you to animate your GPS tracks into a video, Mapy.cz for mobile can track your whereabouts and then export the GPX file, OziExplorer is a desktop application that can import GPX files and show maps, etc.
You can also open GPX file in any text editor, such as TextEdit on Mac or Notepad on Windows. However, what you will see in a text editor is just a bunch of coordinates surrounded by so-called tags. GPX format is based on a standard called XML, which is a way how to put various data into a single text file and send it from one computer programme to another.

What is in GPX file

In the case of GPX format, the most important data is represented by coordinates expressed in Latitude and Longitude. The system of Latitude and Longitude have been used by navigators for more than 2000 years. If you came across Latitude and Longitude before, you may know that there are two ways how to express coordinates in Latitude and Longitude. The traditional one is using degrees, minutes and seconds such as 50° 36’ 31’’. However, GPX files use only single number for the coordinate and that is degree with a number of decimal places. So for example 50° 36’ 31’’ becomes 50.60861111. This is much easier to work with. At least for the computer.

GPX file contains three main categories of data:

  • Waypoints
  • Routes
  • Tracks

Waypoints are points of interest that you can mark manually in your GPS whenever you see something interesting. Or you can import them (via GPX) from other people journeys.
Routes are navigable routes. Think of them as lines produced by Google maps or any satnav when you search for a destination.
Tracks are the most interesting of the three. If you are interested in recordings of your travels, you basically only need the Tracks part of GPX file. Those are series of track points with Latitude and Longitude coordinates recorded automatically on your way. Latitude and Longitude are a compulsory part of every track point.

There are two other commonly used, but optional, parameters for every track point and that is elevation and time. The elevation can be used to display the track in 3D and the time element is used to determine speed. So for example in Geofoobar the time is used for slowing down or speeding up the animation of the track in the final video. There are other parameters included in the GPX standard, but they are optional and not much used.

That is as far as the standard goes. In addition to that, every GPS or Fitness tracker can add so-called extensions, which can add extra information to every track point. For example, fitness trackers can record your heart rate, temperature, steps, etc.

GPX example

As and example you can copy the following text and paste it in your text editor such as Notepad on Windows or Text Edit on Mac. Then save the file with .gpx extension. Now you can create a free account at https://app.geofoobar.com and upload the file. Let’s see what map this file contains :). As a hint, this trip was taken more than 500 years ago and changed the course of history.

<?xml version="1.0"?>
<gpx version="1.1" creator="GDAL 2.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata><bounds minlat="19.083208911091582" minlon="-77.447518684529058" maxlat="38.938867002640876" maxlon="-6.906586832416394"/></metadata>                 
<trk>
  <trkseg>
    <trkpt lat="37.193010115316945" lon="-6.906586832416394">
    </trkpt><trkpt lat="35.921721469190182" lon="-6.989722874669916"></trkpt><trkpt lat="35.183889094190164" lon="-7.488539128191045"></trkpt><trkpt lat="33.79828838996481" lon="-9.01269990283893"></trkpt><trkpt lat="31.636751291373265" lon="-11.312797071853014"></trkpt><trkpt lat="29.61377426320426" lon="-13.391198128191043"></trkpt><trkpt lat="28.28359758714792" lon="-14.721374804247381"></trkpt><trkpt lat="27.410669143485951" lon="-15.552735226782591"></trkpt><trkpt lat="26.814860840669049" lon="-16.300959607064282"></trkpt><trkpt lat="26.565452713908485" lon="-17.04918398734597"></trkpt><trkpt lat="26.634732749119753" lon="-18.393216670444563"></trkpt><trkpt lat="26.579308720950738" lon="-19.473985219740335"></trkpt><trkpt lat="26.828716847711302" lon="-20.845729916923432"></trkpt><trkpt lat="26.828716847711309" lon="-23.034979029599484"></trkpt><trkpt lat="26.482316671654971" lon="-27.746021423965679"></trkpt><trkpt lat="25.928076389964829" lon="-33.371560283120608"></trkpt><trkpt lat="25.52625218573947" lon="-37.763914515514969"></trkpt><trkpt lat="25.33226808714792" lon="-40.174859740867085"></trkpt><trkpt lat="25.359980101232427" lon="-42.183980761993844"></trkpt><trkpt lat="25.720236284331019" lon="-43.625005494388212"></trkpt><trkpt lat="26.343756601232428" lon="-44.387085881712153"></trkpt><trkpt lat="26.70401278433102" lon="-44.969038177486802"></trkpt><trkpt lat="26.66244476320426" lon="-45.952814677486799"></trkpt><trkpt lat="26.066636460387357" lon="-46.520910966219198"></trkpt><trkpt lat="26.011212432218343" lon="-46.867311142275533"></trkpt><trkpt lat="25.775660312500033" lon="-47.144431283120603"></trkpt><trkpt lat="25.581676213908484" lon="-50.733137107064266"></trkpt><trkpt lat="25.318412080105666" lon="-55.08392331833187"></trkpt><trkpt lat="25.124427981514117" lon="-59.891957761993837"></trkpt><trkpt lat="25.08285996038736" lon="-63.54994362114877"></trkpt><trkpt lat="25.055147946302853" lon="-66.154872945092436"></trkpt><trkpt lat="24.556331692781725" lon="-67.789881776078346"></trkpt><trkpt lat="23.641835227992988" lon="-70.11769095917694"></trkpt><trkpt lat="22.990602897007072" lon="-71.780411804247365"></trkpt><trkpt lat="22.838186819542283" lon="-72.40393212114877"></trkpt><trkpt lat="22.879754840669044" lon="-73.429276642275539"></trkpt><trkpt lat="23.240011023767636" lon="-74.205213036641737"></trkpt><trkpt lat="23.364715087147918" lon="-74.731741304247365"></trkpt><trkpt lat="22.921322861795804" lon="-74.38534112819103"></trkpt><trkpt lat="22.755050777288762" lon="-75.452253670444549"></trkpt><trkpt lat="22.200810495598621" lon="-75.535389712698077"></trkpt><trkpt lat="21.646570213908483" lon="-75.826365860585398"></trkpt><trkpt lat="21.563434171654961" lon="-75.97878193805019"></trkpt><trkpt lat="21.785130284331014" lon="-76.782430346500888"></trkpt><trkpt lat="22.505642650528198" lon="-77.447518684529058"></trkpt><trkpt lat="21.812842298415521" lon="-76.68543829720511"></trkpt><trkpt lat="21.49415413644369" lon="-75.673949783120605"></trkpt><trkpt lat="21.327882051936648" lon="-75.147421515514964"></trkpt><trkpt lat="22.020682404049325" lon="-74.426909149317794"></trkpt><trkpt lat="21.036905904049327" lon="-75.424541656360049"></trkpt><trkpt lat="21.341738058978905" lon="-74.981149431007935"></trkpt><trkpt lat="21.300170037852141" lon="-74.482333177486808"></trkpt><trkpt lat="20.593513678697214" lon="-74.357629114106516"></trkpt><trkpt lat="20.385673573063411" lon="-73.997372931007931"></trkpt><trkpt lat="20.205545481514115" lon="-74.468477170444544"></trkpt><trkpt lat="20.330249544894397" lon="-73.900380881712152"></trkpt><trkpt lat="19.969993361795805" lon="-73.415420635233289"></trkpt><trkpt lat="20.150121453345101" lon="-72.722620283120605"></trkpt><trkpt lat="19.845289298415523" lon="-72.029819931007921"></trkpt><trkpt lat="20.025417389964819" lon="-71.489435656360044"></trkpt><trkpt lat="19.900713326584537" lon="-70.505659156360039"></trkpt><trkpt lat="19.388041066021156" lon="-69.43874661410652"></trkpt><trkpt lat="19.263337002640874" lon="-69.078490431007936"></trkpt><trkpt lat="19.083208911091582" lon="-69.286330536641728"></trkpt><trkpt lat="19.20791297447186" lon="-68.829082304247365"></trkpt><trkpt lat="19.221768981514117" lon="-68.385690078895252"></trkpt><trkpt lat="20.136265446302847" lon="-67.360345557768497"></trkpt><trkpt lat="20.094697425176086" lon="-66.722969233824827"></trkpt><trkpt lat="19.831433291373269" lon="-66.113304923965671"></trkpt><trkpt lat="21.341738058978905" lon="-65.877752804247365"></trkpt><trkpt lat="22.173098481514113" lon="-65.323512522557223"></trkpt><trkpt lat="22.879754840669044" lon="-64.769272240867082"></trkpt><trkpt lat="23.905099361795806" lon="-64.506008107064275"></trkpt><trkpt lat="25.526252185739466" lon="-63.979479839458634"></trkpt><trkpt lat="26.135916495598622" lon="-63.716215705655813"></trkpt><trkpt lat="26.316044587147918" lon="-63.0649833746699"></trkpt><trkpt lat="26.994988932218348" lon="-62.760151219740322"></trkpt><trkpt lat="27.438381157570461" lon="-62.483031078895252"></trkpt><trkpt lat="28.117325502640885" lon="-61.610102635233282"></trkpt><trkpt lat="28.740845819542294" lon="-60.418486029599478"></trkpt><trkpt lat="28.657709777288773" lon="-59.711829670444544"></trkpt><trkpt lat="28.436013664612716" lon="-59.351573487345959"></trkpt><trkpt lat="29.64148627728877" lon="-59.129877374669903"></trkpt><trkpt lat="30.555982742077504" lon="-57.287028438050186"></trkpt><trkpt lat="29.946318432218348" lon="-57.009908297205115"></trkpt><trkpt lat="30.611406770246518" lon="-56.774356177486801"></trkpt><trkpt lat="30.860814897007081" lon="-56.053843811289617"></trkpt><trkpt lat="32.1355675448944" lon="-53.71217862114878"></trkpt><trkpt lat="33.590448284331025" lon="-51.065681276078358"></trkpt><trkpt lat="34.324816657570459" lon="-49.250544353543148"></trkpt><trkpt lat="34.685072840669051" lon="-47.421551423965681"></trkpt><trkpt lat="35.017617009683136" lon="-44.525645952134695"></trkpt><trkpt lat="35.405585206866235" lon="-41.740588536641738"></trkpt><trkpt lat="35.765841389964827" lon="-38.692266987345967"></trkpt><trkpt lat="35.765841389964827" lon="-37.708490487345962"></trkpt><trkpt lat="35.07304103785215" lon="-37.292810276078356"></trkpt><trkpt lat="35.100753051936657" lon="-36.890986071853007"></trkpt><trkpt lat="35.461009235035249" lon="-36.322889783120608"></trkpt><trkpt lat="35.599569305457784" lon="-34.674024945092441"></trkpt><trkpt lat="35.959825488556376" lon="-31.15459915636005"></trkpt><trkpt lat="36.20923361531694" lon="-27.995429550726247"></trkpt><trkpt lat="36.320081671654968" lon="-26.914661001430478"></trkpt><trkpt lat="36.902033967429617" lon="-25.903172487345969"></trkpt><trkpt lat="37.179154108274687" lon="-25.279652170444564"></trkpt><trkpt lat="38.149074601232428" lon="-25.071812064810761"></trkpt><trkpt lat="37.400850220950744" lon="-24.891683973261465"></trkpt><trkpt lat="37.248434143485952" lon="-21.801794402838929"></trkpt><trkpt lat="37.220722129401445" lon="-20.125217550726255"></trkpt><trkpt lat="37.428562235035251" lon="-19.764961367627663"></trkpt><trkpt lat="37.35928219982398" lon="-18.975168966219211"></trkpt><trkpt lat="36.87432195334511" lon="-18.878176916923437"></trkpt><trkpt lat="37.012882023767645" lon="-18.587200769036112"></trkpt><trkpt lat="37.206866122359195" lon="-17.50643221974034"></trkpt><trkpt lat="37.664114354753558" lon="-15.053918973261464"></trkpt><trkpt lat="37.885810467429607" lon="-13.626750247909351"></trkpt><trkpt lat="37.913522481514114" lon="-12.32428558593752"></trkpt><trkpt lat="38.938867002640876" lon="-9.248252022557239"></trkpt><trkpt lat="38.0382265448944" lon="-9.317532057768506"></trkpt><trkpt lat="36.721905875880317" lon="-9.317532057768506"></trkpt><trkpt lat="36.555633791373275" lon="-8.887995839458647"></trkpt><trkpt lat="36.527921777288768" lon="-7.710235240867098"></trkpt><trkpt lat="36.763473897007074" lon="-7.045146902838928"></trkpt><trkpt lat="37.082162058978909" lon="-6.920442839458648"></trkpt>
  </trkseg>
</trk>
</gpx>

Tags:
,
No Comments

Post A Comment