GPS Exchange Format

GPS eXchange Format
Filename extension .gpx
Internet media type application/gpx+xml
Initial release 2002
Latest release
1.1 [1]
(August 9, 2004)
Extended from XML
Website www.topografix.com/gpx.asp

GPX, or GPS Exchange Format, is an XML schema designed as a common GPS data format for software applications.

It can be used to describe waypoints, tracks, and routes. The format is open and can be used without the need to pay license fees. Its tags store location, elevation, and time and can in this way be used to interchange data between GPS devices and software packages. Such computer programs allow users, for example, to view their tracks, project their tracks on satellite images or other maps, annotate maps, and tag photographs with the geolocation in the Exif metadata.

Data types

This is the essential data contained in GPX files.[2] Ellipsis (...) means that the previous element can be repeated. Additional data may exist within every markup but is not shown here:

Technically:

The minimum properties for a GPX file are latitude and longitude for every single point. All other elements are optional. Some vendors, such as Hummingbird and Garmin, use extensions to the GPX format for recording street address, phone number, business category, air temperature, depth of water, and other parameters.[4][5]

Units

Latitude and longitude are expressed in decimal degrees using the WGS 84 datum. Elevation is recorded in meters. Dates and times are not local time, but instead are Coordinated Universal Time (UTC) using ISO 8601 format.[1]

Sample GPX document

The following is a truncated (for brevity) GPX file produced by a Garmin Oregon 400t hand-held GPS unit. This document does not show all functionality which can be stored in the GPX format — for example, there are no waypoints or extensions, and this is part of a track, not a route — but its purpose is to serve as a brief illustration.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" creator="Oregon 400t" 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 http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd">
  <metadata>
    <link href="http://www.garmin.com">
      <text>Garmin International</text>
    </link>
    <time>2009-10-17T22:58:43Z</time>
  </metadata>
  <trk>
    <name>Example GPX Document</name>
    <trkseg>
      <trkpt lat="47.644548" lon="-122.326897">
        <ele>4.46</ele>
        <time>2009-10-17T18:37:26Z</time>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

[ex: route]

<gpx>
 <rte>
  <name> xsd:string </name> [0..1] ?
  <cmt> xsd:string </cmt> [0..1] ?
  <desc> xsd:string </desc> [0..1] ?
  <src> xsd:string </src> [0..1] ?
  <link> linkType </link> [0..*] ?
  <number> xsd:nonNegativeInteger </number> [0..1] ?
  <type> xsd:string </type> [0..1] ?
  <extensions> extensionsType </extensions> [0..1] ?
  <rtept lat="47.644548" lon="-122.326897">
    <name>rtename</name>
  </rtept>
 </rte>
</gpx>

See also

References

External links