GPX
Open GPS data interchange format
GPX (GPS Exchange Format) is an open, XML-based file format for storing and exchanging GPS data such as waypoints, tracks, and routes between devices, applications, and mapping services. It was created to give hardware and software vendors…
Definition
GPX (GPS Exchange Format) is an open, XML-based file format for storing and exchanging GPS data such as waypoints, tracks, and routes between devices, applications, and mapping services. It was created to give hardware and software vendors a common, non-proprietary way to describe geographic paths and points of interest, so a hike recorded on one GPS receiver or phone app can be opened, edited, or shared through another without a custom conversion step.
Overview
A GPX file is a plain-text XML document built around three core element types: waypoints (single labeled coordinates, such as a trailhead or campsite), routes (a planned, ordered sequence of waypoints to follow), and tracks (an actual recorded path made up of many timestamped trackpoints logged as a device moved). Each point carries latitude and longitude, and optionally elevation, timestamp, and vendor-specific extensions, all wrapped in a schema defined by an XML namespace so that parsers can validate structure before trying to interpret the data. Mechanically, a GPX file is produced either by a GPS-enabled device exporting its internal log, or by software that lets a user draw a route on a map and save it. Because the format is just structured text, it can be generated, inspected, or edited with nothing more than a text editor, though in practice most users interact with it through mapping tools, fitness trackers, or outdoor navigation apps that read and write GPX behind a friendlier interface. The XML schema is deliberately minimal and extensible: the base specification covers common fields, while an `<extensions>` element lets vendors add proprietary data, such as heart rate or cadence, without breaking compatibility with tools that only understand the base fields. GPX sits alongside other geographic data formats but serves a narrower purpose than most of them. GeoJSON, for example, is a general-purpose format for arbitrary geographic features and is more common in web mapping and GIS pipelines, while GPX is specifically oriented around the waypoint/route/track model used by consumer GPS devices and outdoor recreation software. KML, popularized by Google Earth, overlaps with GPX in some use cases but adds styling and visualization metadata that GPX intentionally omits, keeping GPX files smaller and more portable for pure location logging. In practice, GPX is the lingua franca for hiking, cycling, and running communities: a route planned in one application can be exported as a .gpx file, uploaded to a GPS watch or bike computer, and later the recorded track can be uploaded back to a website for sharing or analysis. Outdoor mapping platforms, fitness tracking services, and geocaching tools all support GPX import and export as a baseline expectation, and many desktop GIS and mapping libraries include GPX parsers as a standard feature. The format's simplicity is also its limitation: GPX has no built-in support for complex geometries like polygons or multi-part shapes, which limits its use in full GIS analysis compared to formats like GeoJSON or Shapefile. Large tracks with many trackpoints can produce sizable, verbose XML files compared to more compact binary alternatives, and because extensions are vendor-specific, some device-recorded metadata does not transfer cleanly between different software ecosystems. For anything beyond point-and-path data — thematic mapping, spatial analysis, or general geographic feature storage — GeoJSON or a dedicated GIS format is usually the better fit.
Specification
- XML-based schema shared openly across GPS hardware and software vendors
- Distinguishes waypoints, routes, and tracks as separate structured element types
- Stores latitude, longitude, elevation, and optional timestamps per point
- Extensible via a vendor-specific extensions element without breaking base compatibility
- Human-readable plain text, editable without specialized binary tools
- Widely supported import/export target for GPS devices and mapping apps
- No built-in styling or complex polygon geometry support