GPS Exchange Format


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 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

A GPX file's main components are waypoints, routes, and tracks:
  • A waypoint contains the World Geodetic System#WGS 84 coordinates of a point and optionally other descriptive information.
  • A route is an ordered list of waypoints representing a series of significant turn points leading to a destination. In general, a route is used to describe directions for a journey which someone wants to take at some point in the future.
  • A track consists of possibly multiple segments, which in turn each contain a series of waypoints. It is typically used to represent journeys which somebody has already completed or recorded.
Note that the XML tags enclosing each waypoint of a route or track segment are called rtept and trkpt, respectively, while the tag for the basic waypoint element is wpt. Despite this difference in name, they all hold the same data type called wptType.
In addition to the above, GPX files can also contain additional data. The minimum properties for a GPX file are latitude and longitude for every single point. Some vendors, such as and Garmin, use extensions to the GPX format for recording street address, phone number, business category, air temperature, depth of water, and other parameters.

Units

Latitude and longitude are expressed in decimal degrees, and elevation in meters, both using the WGS 84 datum. Dates and times are expressed in Coordinated Universal Time using ISO 8601 format.

Sample GPX document

The document below is a sample GPX file which contains three waypoints which correspond to the locations of the German, Swiss, and Austrian parliaments.


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">

Data name
Valid GPX example without special characters

Author name



35.0

Reichstag
City


179

Parlament
City



Bundeshaus
City