GPS Waypoints, Routes, and Tracks – the difference

.gpx xml file anatomy

The 3 xml file examples below contain four 'positions' with longitude and latitude only. There is no elevational or time information, although in the Track, there probably would be if it had been generated on the GPS by following an actual course on the ground.

A .gpx Waypoints file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="RouteConverter">
    <metadata>
        <name>Test file by Patrick</name>
   </metadata>
    <wpt lon="9.860624216140083" lat="54.9328621088893">
        <ele>0.0</ele>
        <name>Position 1</name>
    </wpt>
    <wpt lon="9.86092208681491" lat="54.93293237320851">
        <ele>0.0</ele>
        <name>Position 2</name>
    </wpt>
    <wpt lon="9.86187816543752" lat="54.93327743521187">
        <ele>0.0</ele>
        <name>Position 3</name>
    </wpt>
    <wpt lon="9.862439849679859" lat="54.93342326167919">
        <ele>0.0</ele>
        <name>Position 4</name>
    </wpt>
</gpx>

A .gpx Route file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="RouteConverter">
    <metadata>
        <name>Test file by Patrick</name>
    </metadata>
    <rte>
        <name>Patrick's Route</name>
        <rtept lon="9.860624216140083" lat="54.9328621088893">
            <ele>0.0</ele>
            <name>Position 1</name>
        </rtept>
        <rtept lon="9.86092208681491" lat="54.93293237320851">
            <ele>0.0</ele>
            <name>Position 2</name>
        </rtept>
        <rtept lon="9.86187816543752" lat="54.93327743521187">
            <ele>0.0</ele>
            <name>Position 3</name>
        </rtept>
        <rtept lon="9.862439849679859" lat="54.93342326167919">
            <ele>0.0</ele>
            <name>Position 4</name>
        </rtept>
    </rte>
</gpx>

A .gpx Track

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="RouteConverter">
    <metadata>
        <name>Test file by Patrick</name>
    </metadata>
    <trk>
        <name>Patrick's Track</name>
        <trkseg>
            <trkpt lon="9.860624216140083" lat="54.9328621088893">
                <ele>0.0</ele>
                <name>Position 1</name>
            </trkpt>
            <trkpt lon="9.86092208681491" lat="54.93293237320851">
                <ele>0.0</ele>
                <name>Position 2</name>
            </trkpt>
            <trkpt lon="9.86187816543752" lat="54.93327743521187">
                <ele>0.0</ele>
                <name>Position 3</name>
            </trkpt>
            <trkpt lon="9.862439849679859" lat="54.93342326167919">
                <ele>0.0</ele>
                <name>Position 4</name>
            </trkpt>
        </trkseg>
    </trk>
</gpx>

Other examples of .gpx xml Tracks

A .gpx Track transferred from a Garmin eTrex GPS

(For comparison, cut down to 4 trackpoints)

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="MapSource 6.15.5" version="1.1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

  <metadata>
    <link href="http://www.garmin.com">
      <text>Garmin International</text>
    </link>
    <time>2010-02-26T12:34:51Z</time>
    <bounds maxlat="55.4671788" maxlon="8.7806700" minlat="53.5943500" minlon="-3.0144167"/>
  </metadata>

  <trk>
    <name>24-JUL-09</name>
    <extensions>
      <gpxx:TrackExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
        <gpxx:DisplayColor>DarkRed</gpxx:DisplayColor>
      </gpxx:TrackExtension>
    </extensions>
    <trkseg>
      <trkpt lat="53.623000" lon="-2.574910">
       <ele>143.94</ele>
       <time>2009-07-11T21:37:58Z</time>
      </trkpt>
      <trkpt lat="53.624500" lon="-2.569600">
       <ele>136.06</ele>
       <time>2009-07-11T21:38:55Z</time>
      </trkpt>
      <trkpt lat="53.624500" lon="-2.569410">
       <ele>138.03</ele>
       <time>2009-07-11T21:38:57Z</time>
      </trkpt>
      <trkpt lat="53.624700" lon="-2.567970">
       <ele>148.75</ele>
       <time>2009-07-11T21:39:12Z</time>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

This file contains elevation and time information but the positions do not contain a name.

A .gpx Track exported from Bikely

(For comparison, cut down to 4 trackpoints)

<?xml version="1.0"?>
<gpx version="1.1"
creator="Bikely - http://www.bikely.com"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<desc>Patrick's Track</desc>
<trkseg>
			<trkpt lat="53.59883" lon="-2.54164">
			<ele>141</ele>
			</trkpt>
			<trkpt lat="53.59891" lon="-2.54271">
			<ele>139</ele>
			</trkpt>
			<trkpt lat="53.5992" lon="-2.54516">
			<ele>131</ele>
			</trkpt>
			<trkpt lat="53.60064" lon="-2.547">
			<ele>131</ele>
			</trkpt>
</trkseg></trk></gpx>

Contains elevation information but no name or time.

.gpx file comparisons in MapSource map

(Generated from the first 3 files above: Waypoints .gpx, Route .gpx, and Track .gpx)

GPS Waypoints

waypoints

GPS Waypoints in MapSource – Waypoints flagged with position names – this is not a course as such

GPS Route

route

A GPS Route in MapSource – Route in purple with positions flagged – for active navigation

GPS Track

track

A GPS Track in MapSource – Track in yellow with positions dotted – for passive navigation

A single Waypoint transferred from a Garmin eTrex Legend HCx

On the pavement outside the front door of Betty's Tea Rooms in Harrogate, Yorkshire.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" 
creator="MapSource 6.15.5" version="1.1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

  <metadata>
    <link href="http://www.garmin.com">
      <text>Garmin International</text>
    </link>
    <time>2010-02-26T13:56:57Z</time>
    <bounds maxlat="53.9927816" maxlon="-1.5425382" minlat="53.6026512" minlon="-2.5333170"/>
  </metadata>

  <wpt lat="53.9927816" lon="-1.5425382">
    <ele>134.7094727</ele>
    <name>Bettys</name>
    <cmt>02-FEB-10 14:10:06</cmt>
    <desc>02-FEB-10 14:10:06</desc>
    <sym>Flag, Blue</sym>
    <extensions>
      <gpxx:WaypointExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
        <gpxx:DisplayMode>SymbolAndName</gpxx:DisplayMode>
      </gpxx:WaypointExtension>
    </extensions>
  </wpt>

</gpx>

The essential xml syntax for GPX Waypoints, Routes, and Tracks should be self-evident from the above. In a plain text editor you can open the files, edit them, or write your own, although they are usually generated by a GPS unit, using software such as MapSource, or on a website offering online route planning and export of .gpx files to your computer or GPS. Read more on the GPX 1.1 Schema Documentation »

9 comments on “GPS Waypoints, Routes, and Tracks – the difference”

  1. Mick F wrote:

    All this is gobbldygook to me!

    I make my routes with BikeHike or MapitPronto, or MapMy Ride. All I do is construct my route by clicking the map and making sure that the route produced is where I want it.

    I then download it into my Garmin Edge and it can navigate for me, or just show me the route on the map screen.

    Simple. I don't need to know anything more.
    Perhaps I'm missing something, but I know not what.

    I understand that a Course is a route I can use with Garmin Training Centre and I can make it from previously recorded rides. I can input a made-up one from BikeHike and turn it into a Course. Virtual Partner works with a Course, but not with a Route. I don't use Courses much.

    I understand about Waypoints too. I can insert them, and I can select them and navigate to them just like any address that my Edge 705 can see. I only have one Waypoint – at my home location. As I know the elevation here, it helps to keep the Edge's elevation correct when I start out. Edge 705s have a problem with elevations being way out from time to time, it's a known problem.

    So you see, I don't know much!
    Mick.

  2. Patrick wrote:

    Websites that make routes generate XML (a language). A .gpx file is XML (websites are built in a language called HTML). When you load a file into your GPS it reads and handles it according to the type of file and how the GPS is programmed.

    I use my GPS a lot and I'm interested in how it works. That's all. I'm not interested in ball bearings so I don't take my hubs to bits. Others do. Each to his own I suppose.

  3. Mick F wrote:

    Ah!
    That makes sense. Ta!
    So the routes are made up of Trackpoints? (trkpt – as above) How many of them must be dependent upon the bends and curves of the route? Am I right? If so, a straight road could only have two Trackpoints – one at either end.

    How can I tell how many trackpoints there are in any route?

    Sorry Patrick, so many questions!
    Mick.

  4. Patrick wrote:

    Well... I tend to refer to where I'm going as a course, so not to confuse the issue (because a Route and a Track are not the same). But it seems that Course means something as well! How about path?

    Anyway, what I've tried to illustrate above is the makeup of Waypoints, Routes, and Tracks – in terms of their different XML structures. There's no need to know this when using a GPS unless you're curious how it works. But yes, a Track is made up of trackpoints (trkpt) and a Route is routepoints (rtept). As you say, a straight road needs only 2.

    You can see the list of points in a 'path' (i.e. Track or Route) by opening the .gpx file in Windows Notepad or the Mac equivalent text editor. .gpx files (GPS Exchange Format) are interchangeable between applications and Web services, so you can both use them on a GPS and upload them onto a mapping website. Not that you'd want to do this, but you can theoretically write your own in a plain text editor.

    You can't easily count the number of points on a long path without using something like Garmin MapSource, and that isn't yet supported for Mac (which is ridiculous). So you'd have to use something else, like RouteConverter maybe – it's free and works well for me.

    Those diagrams above illustrate how Waypoints, Routepoints, and Trackpoints behave. Generally speaking you cannot navigate a Track on a GPS other than by simply following the line in map view. With a Route, the GPS will navigate actively, recalculating as required. And you can tell the GPS to 'go to' a Waypoint.

    The tracklog your GPS generates as you cycle – what you've referred to as a trace – is a Track in just the same XML format as a Track you export from BikeHike, except that it might well include elevational data in the <ele> tags (and perhaps time data).

    I hope this helps.

  5. Mick F wrote:

    Ah!
    (again)

    TextEdit works! I tried to upload the printout, but when I went to preview the post, it wasn't correct, the blog seems not to like all the left and right arrows.

    It was of a "path" I've just created on BikeHike. I can see all the trackpoints, these must have been created by BikeHike's software. I got my computer to count the trackpoints – 178 of them and it was only 9.76 miles. Therefore 100 miles would be approximately 1800 trackpoints. Is this a fair estimate?

    If I were to write my own or edit one, how do you turn it into a .gpx file?
    (Not that I want to, just curious!)

    Regards, and thank you for being patient!
    Mick.

  6. Patrick wrote:

    Nope, you can't display those arrow things when they're written as a tag because your browser thinks it's XML or HTML (which it is) and the tag markup won't be displayed – it will just behave as HTML. But you can write < and > on their own. I wrote the example files above using HTML special characters so the arrow brackets would display in the page.

    BikeHike generates points in its own way, and probably adds more in than is strictly required – but I think you can filter the number down before you export.

    To create your own .gpx file, you just type it into a text editor (using the correct XML syntax like the examples above) and save it with .gpx at the end instead of .txt.

  7. Keith wrote:

    I just want to install maps onto my Garmin Legend HCx so I can drive or ride to the start and follow the maps people already created on Bikely or MapMyRide. Can anyone please help me with this. kelyons80@gmail.com

  8. Aidan G wrote:

    I'm going to do a supported 3 day ride and they have sent the route as a .gpx file, but MapMyRide won't import it as it says it doesn't have workout data in it...

    Can anyone help?

    A

  9. Ian wrote:

    I found that article quite fascinating and am going to read it through a few times as part of a process of understanding gps better. I've been trying Strava and Mapmyride thus far and have View something or other to try next. There is a certain convenience about using phone-based apps but the speed and consistency with which a gps signal is acquired seems to be a little variable thus far. For this reason I'd like to consider the advantage/s of a dedicated gps and wondered whether there was a particular one that both cyclists and hikers gravitate towards?
    Best
    Ian

Leave a comment

Add a Smiley Smiley »

Current day month ye@r *