GPX File Structure
GPX structures and standards.

The Gaia Problem
For real-world navigation, I'm sufficiently happy using Open Street Map with a client app like CoMaps instead of Google Maps. This doesn't link together phone numbers and all the carefully curated data attached to each location, but navigation to common destinations is easy enough.
However, Google Maps was historically and still is pretty bad at recording a GPS track, for example a trail hike. This was an issue before I started my de-Google journey. I had used Gaia GPS to this end, but it was bought by Outside and has since become a poor product with significant technical issues and privacy concerns. There are lots of Reddit posts about this, if you need more on that. Fortunately for us, Gaia GPS allows import and export of tracks and bookmarks, so I was able to export 4 years of hiking and dirt bike recorded trails before closing the account.
Comaps can record tracks quite well, and allows export to KML and GPX formats.
Wanderer
Since moving my map data out of Google Maps, I now have a few options to visualize and manage recorded tracks. I have opted to use Comaps to record tracks and navigate, and I use Wanderer to host and curate these tracks.
The ins and outs of the workflow used for moving recorded tracks between Comaps and Wanderer are for another post, but suffice to say that it's a manual process for now involving export, import, and editing of some tracks.
Wanderer allow the import of GPX, KML, FIT, and TCX track formats, of which GPX and KML are by far the most popular, and GPX seems to be the most commonly used exchange format for GPS tracks among the many GPS track-to-map services and apps.
GPX Format
GPX is a well-defined format. It's an extensible XML schema describing 3 main types of data:
- Waypoint (wpt)
- Route (rte)
- Track (trk)
Using an XML parsing tool like xmllint, we can see what a typical GPX file's structure looks like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="CoMaps" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 https://www.topografix.com/GPX/1/1/gpx.xsd http://www.topografix.com/GPX/gpx_style/0/2 https://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 https://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2">
<metadata>
<name>Cornice Ridge</name><desc><p>With Buddy and Pal</p></desc><time>2025-10-05T00:00:00Z</time><keywords>xmoxwkh5v9gh0rh, Area G, British Columbia, Canada</keywords>
<author>
<name>ltwxdouk702guo4</name><email>someemail@psomedomain.com</email>
</author>
</metadata>
<trk>
<name>Cornice Ridge</name>
<extensions>
<gpxx:TrackExtension>
<gpxx:DisplayColor>DarkGray</gpxx:DisplayColor>
</gpxx:TrackExtension>
<gpx_style:line>
<gpx_style:color>737373</gpx_style:color>
</gpx_style:line>
<xsi:gpx>
<color>#FF737373</color>
</xsi:gpx>
</extensions>
<trkseg>
<trkpt lat="49.059051" lon="-117.04147">
<ele>1756</ele><time>2025-10-05T19:06:49Z</time>
</trkpt>
<trkpt lat="49.059091" lon="-117.04165">
<ele>1760</ele><time>2025-10-05T19:07:22Z</time>
</trkpt>
<trkpt lat="49.059113" lon="-117.0418">
<ele>1759</ele><time>2025-10-05T19:07:37Z</time>
</trkpt>
<trkpt lat="49.058962" lon="-117.04118">
<ele>1756</ele><time>2025-10-05T21:53:51Z</time>
</trkpt>
<trkpt lat="49.058868" lon="-117.04104">
<ele>1760</ele><time>2025-10-05T21:56:59Z</time>
</trkpt>
<trkpt lat="49.058848" lon="-117.04091">
<ele>1759</ele><time>2025-10-05T21:57:10Z</time>
</trkpt>
<trkpt lat="49.058784" lon="-117.04103">
<ele>1751</ele><time>2025-10-05T21:58:23Z</time>
</trkpt>
<trkpt lat="49.058836" lon="-117.0409">
<ele>1752</ele><time>2025-10-05T21:59:43Z</time>
</trkpt>
</trkseg>
</trk>
<features/>
</gpx>
We can see:
- XML preamble, which defines gpx version, creator info (internal refs allowed), supported metadata types, and supported extensions.
- Extensible GPX elements: TrackExtension, gpx style, line color, etc.
- GPX Element, containing the trk data, showning lat/long values, elevation values and time
Now one interesting bit that usually doesn't get highlighted or indicated in any way by most GPX conversion tools is what's in the metadata XML preamble: URLs for the followed spec for GPX from topographix.com and XML from www.w3.org are certainly neat, but we can also see which app created the GPX. In this case, it's CoMaps.
The surprise to me is seeing Garmin's grubby fingers on all the GPX tracks I've worked with; All my GPX exports contain several references to Garmin's GPX Extensions but this reference seems to have been taken down some time between Feb 18 and April 16, 2018. The new reference seems to be https://www8.garmin.com/xmlschemas/GpxExtensionsv3.xsd, where we can see really interesting fields like proximity, temperature, Address, DisplayMode, etc.
One potential concern is the name and email tags, which definitely had my email (since obfuscated. I do wonder how ltwxdouk702guo4 translates to jdusablon, it is definitely not base64. If anyone ever reads this but me, I'd be curious to know what that string is.
This is a good place to bookmark this and make another post on how to edit and fix GPX files.