GPS Exchange Format

From Wikipedia, the free encyclopedia
(Redirected from GPX (data transfer))
GPS Exchange Format
Filename extension
Internet media type
application/gpx+xml and application/octet-stream
Initial release2002
Latest release
August 9, 2004; 19 years ago (2004-08-09)
Extended fromXML
Open format?yes

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. It is an open format and can be used without the need to pay license fees. Location data (and optionally elevation, time, and other information) is stored in tags and can be interchanged between GPS devices and software. Common software applications for the data include viewing tracks projected onto various map sources, annotating maps, and geotagging photographs based on the time they were taken.

Data types[edit]

Waypoints, routes and tracks recorded by GPS receivers.

The required data for a GPX file can be seen below.[2] Ellipsis (...) means that the previous element can be repeated. Additional data may exist within every markup but is not shown here:

  • wptType is an individual waypoint among a collection of points with no sequential relationship. It consists of the WGS 84 (GPS) coordinates of a point and possibly other descriptive information.
  • rteType is a route, an ordered list of routepoint (waypoints representing a series of significant turn or stage points) leading to a destination.[3]
  • trkType is a track, made of at least one segment containing waypoints, that is, an ordered list of points describing a path.[3] A Track Segment holds a list of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data.

Conceptually, tracks are a record of where a person has been and routes are suggestions about where they might go in the future. For example, each point in a track may have a timestamp (because someone recorded where and when they were there), but the points in a route are unlikely to have timestamps (other than estimated trip duration) because route is a suggestion which might never have been traveled.


  • a track is made of a sufficient number of trackpoints to precisely draw every bend of a path on a bitmap. It is:
    • the raw output of, for example, a GPS recording the course of one's trip, or
    • the rearrangement of such points to remove excess ones, or
    • data from any source such as extracted from a vector map
  • a route is made of routepoints between which a program must get the corresponding track from a vector map to draw it. The routepoints may be crossings or junctions or as distant as stopover towns, such as those making a trip project. Hence, such a project can be saved and reloaded in a GPX file.
  • a process called routing computes a route and may produce a GPX route made of the routepoints where some driver action takes place (turn left, enter a roundabout, limit speed, name of the next direction road, etc.). The GPX points may contain the text of those instructions.
  • the GPX file may contain both route and track so that a program can get precise points from the track even if it has no access to a vector map.

The minimum properties for a GPX file are latitude and longitude for every single point. All other elements are optional. Some vendors, such as Humminbird 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]


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

Sample GPX document[edit]

The following is a truncated (for brevity) GPX file produced by a Garmin Oregon 400t hand-held GPS unit. This document shows only some of the functionality supported by the GPX format — for example, there are no waypoints or extensions, and this is part of a track, not a route. Indeed, the purpose of this extract is to serve as a brief illustration.

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

<gpx xmlns="" xmlns:gpxx="" xmlns:gpxtpx="" creator="Oregon 400t" version="1.1" xmlns:xsi="" xsi:schemaLocation="">
    <link href="">
      <text>Garmin International</text>
    <name>Example GPX Document</name>
      <trkpt lat="47.644548" lon="-122.326897">
      <trkpt lat="47.644548" lon="-122.326897">
      <trkpt lat="47.644548" lon="-122.326897">

See also[edit]

File formats
  • GPSBabel, used to upload/download/convert GPX files


  1. ^ a b GPX: the GPS Exchange Format
  2. ^
  3. ^ a b
  4. ^ "Garmin Mass Storage Mode Devices - Garmin Developer". Garmin. Archived from the original on 2014-08-20. Retrieved 2013-03-26.
  5. ^ "Garmin Gpx Extensions Schema" (xsd (XML schema)). Garmin. Retrieved 2013-03-26.

External links[edit]