Written on 13/05/15 by Paul Oldham

What is a GPX file?

If you use a GPS and want to exchange data with a computer then you will have had to grapple with GPX files. So what are they all about?

Well, simply put GPX is just shorthand for "GPS eXchange Format" and the files themselves are just plain text files. To be technical for a minute they're actually XML files. So if you look at one it will look something like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx creator="Foretrex 301" version="1.1"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"
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
http://www.garmin.com/xmlschemas/GpxExtensions/v3
http://www.garmin.com/xmlschemas/GpxExtensions/v3/GpxExtensionsv3.xsd">
  <trk>
    <name>02-MAR-12: 02 MAR 2012 09:15</name>
    <trkseg>
      <trkpt lat="54.604068" lon="-3.130546">
        <ele>97.23</ele>
        <time>2012-03-02T10:44:54Z</time>
      </trkpt>
      <trkpt lat="54.604004" lon="-3.130589">
        <ele>94.83</ele>
        <time>2012-03-02T10:45:14Z</time>
      </trkpt>
      <trkpt lat="54.603940" lon="-3.130503">
        <ele>96.27</ele>
        <time>2012-03-02T10:45:30Z</time>
      </trkpt>
      <trkpt lat="54.603940" lon="-3.129644">
        <ele>91.94</ele>
        <time>2012-03-02T10:46:22Z</time>
      </trkpt>
      <trkpt lat="54.603875" lon="-3.129108">
        <ele>91.46</ele>
        <time>2012-03-02T10:46:47Z</time>
      </trkpt>
      <trkpt lat="54.603875" lon="-3.128529">
        <ele>90.50</ele>
        <time>2012-03-02T10:47:26Z</time>
      </trkpt>

That's just the start of a GPX file taken off our Garmin Foretrex 301 GPS. It actually goes on for a lot longer than that.

But you don't need to worry about what the file looks like inside. All you need to worry about is what you can do with your GPX files. Essentially a GPX file can contain two similar but different sorts of data which we're interested in:

  1. one or more routes - this is where you plan to go, so it's a collection of longitudes and latitudes of "routepoints" (waypoints representing a series of significant turn or stage points). Typically you will have entered these using a external tool like our mapping software or downloaded the route from one our walks.
  2. one or more tracks - this is where you've been (the GPX example above is a track). So your GPS will automatically record your position and elevation1 every so often along with the precise time (in UTC). Typically the GPS is smart enough to know that it can vary the recording rate depending on how fast you are travelling and/or changing direction. You can load a GPX with tracks in it into our mapping software and see exactly where you've been. You can also upload the GPX file as an attached file to a walk report in our forum and the track will be displayed as a map as part of your report.

GPS IIR-M satellite
GPS Block IIR(M) satellite

In addition to these two there is a third sort of data which you may have in a GPX file:

  1. one of more waypoints - this a collection of points to be displayed on the GPS if it has a map but with no sequential relationship. We've never found this very useful in a GPX file, but you may have an application which needs it.

So that's a very quick overview of what a GPX file is. We also have a page on using our routes which you may find useful reading as it looks at some of the tools which are available to check GPX files and to upload to and download from GPX files from your GPS.

  1. One thing I should warn you about is that elevations are in generally not very accurate. There are two reasons for this. One is rather technical and relates to chart datum, a subject to which I may return in another blog post, the other is a simply that the way the Global Positioning System is designed means that there is a larger error in elevation than in longitude and latitude. That's why, when you display a track on our mapping software, we ignore the elevation data in the GPX file and assume you're standing on the ground so we can rely on OS height data.

Tagged: GPS


You can comment on this post in our forum.

WalkLakes recognises that hill walking, or walking in the mountains, is an activity with a danger of personal injury or death.
Participants in these activities should be aware of and accept these risks and be responsible for their own actions.