GPS Exchange Format

from Wikipedia, the free encyclopedia
GPS Exchange Format
File extension : .gpx
Developed by: TopoGrafix
Type: Markup language
Extended by: XML
Website : GPX: the GPS Exchange Format

The GPS Exchange Format ( GPX ) is a data format for storing geodata (originally mainly GPS data) that was developed by TopoGrafix . It is based on the general XML standard. An XML schema describes the elements and the structure of the GPS exchange format. The abbreviation .gpx is used as the file extension .

The GPS Exchange Format is an open, license-free format that can be used by anyone free of charge. It can facilitate the exchange of geospatial data between different programs.

Properties of the GPX format

Waypoints, Route and Track

The XML schema for the GPX standard defines a number of data types or tags, the schema is expandable. Most GPS receivers mainly provide data for waypoints , routes and tracks . In the GPX format, this data can be converted to metadata such as B. Author or description can be added.

The geographical coordinates latitude, longitude and altitude of the coordinates in a GPX file refer to the WGS84 reference ellipsoid. A position specification in GPX format takes place in degrees with decimal degrees as decimal places. One meter at the equator corresponds to approx. 0.000009 ° (see the original definition of meter ). As a rule of thumb, the sixth decimal place indicates an accuracy in the decimeter range. Specifications with two decimal places are in the kilometer range. Heights are given in meters.

The GPX format has the advantage that the data is available as text in a form that is easy for humans to read. However, this results in a considerably higher storage requirement. Different types of geometry (points, lines, areas) can be saved in a single GPX file.

A GPX file can be validated. It is checked whether the structure of the file follows the rules defined in the XML schema and is therefore valid. The XML schema of the GPX format is currently in version 1.1.


A GPX file consists of the coordinates and their description. A distinction is made according to type:

Waypoint ( <wpt>)
Individual location points / waypoints.
Route ( <rte>)
A sorted sequence of location points / waypoints ( <rtept>). Describes a planned course or a series of turning points to get to a goal.
Track ( <trk>)
A sorted list of consecutive points ( <trkpt>) that make up a line. For example, a path recorded by a GPS device. The points are again summarized in individual sections (track segment, short <trkseg>).

All three types can be listed in a file (also several times).

The basic structure is set up as follows, with UTF-8 coded data, a byte order mark must be expected at the beginning of the file :

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx version="1.1" creator="Ersteller der Datei">
  <metadata> <!-- Metadaten --> </metadata>
  <wpt lat="" lon="yy.yyy"> <!-- Attribute des Wegpunkts --> </wpt>
  <!-- weitere Wegpunkte -->
    <!-- Attribute der Route -->
    <rtept lat="" lon="yy.yyy"> <!-- Attribute des Routenpunkts --> </rtept>
    <!-- weitere Routenpunkte -->
  <!-- weitere Routen -->
    <!-- Attribute des Tracks -->
      <trkpt lat="" lon="yy.yyy"> <!-- Attribute des Trackpunkts --> </trkpt>
      <!-- weitere Trackpunkte -->
    <!-- weitere Track-Segmente -->
  <!-- weitere Tracks -->

The possible attributes are the same for waypoints, route points and track points. In addition to lat(latitude) and lon(longitude), the following elements can be used to describe the coordinate further :

<ele> xsd:decimal </ele>                     <!-- Höhe in m -->
<time> xsd:dateTime </time>                  <!-- Datum und Zeit (UTC/Zulu) in ISO 8601 Format: yyyy-mm-ddThh:mm:ssZ -->
<magvar> degreesType </magvar>               <!-- Deklination / magnetische Missweisung vor Ort in Grad -->
<geoidheight> xsd:decimal </geoidheight>     <!-- Höhe bezogen auf Geoid -->
<name> xsd:string </name>                    <!-- Eigenname des Elements -->
<cmt> xsd:string </cmt>                      <!-- Kommentar -->
<desc> xsd:string </desc>                    <!-- Elementbeschreibung -->
<src> xsd:string </src>                      <!-- Datenquelle/Ursprung -->
<link> linkType </link>                      <!-- Link zu weiterführenden Infos -->
<sym> xsd:string </sym>                      <!-- Darstellungssymbol -->
<type> xsd:string </type>                    <!-- Klassifikation -->
<fix> fixType </fix>                         <!-- Art der Positionsfeststellung: none, 2d, 3d, dgps, pps -->
<sat> xsd:nonNegativeInteger </sat>          <!-- Anzahl der zur Positionsberechnung herangezogenen Satelliten -->
<hdop> xsd:decimal </hdop>                   <!-- HDOP: Horizontale Streuung der Positionsangabe -->
<vdop> xsd:decimal </vdop>                   <!-- VDOP: Vertikale Streuung der Positionsangabe -->
<pdop> xsd:decimal </pdop>                   <!-- PDOP: Streuung der Positionsangabe -->
<ageofdgpsdata> xsd:decimal </ageofdgpsdata> <!-- Sekunden zwischen letztem DGPS-Empfang und Positionsberechnung -->
<dgpsid> dgpsStationType:integer </dgpsid>   <!-- ID der verwendeten DGPS Station -->
<extensions> extensionsType </extensions>    <!-- GPX Erweiterung -->


The following GPX example shows the most important elements based on the positions of the parliament buildings in Germany, Austria and Switzerland:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="" version="1.1" creator="Wikipedia"
 <!-- Kommentare sehen so aus -->
  <desc>Validiertes GPX-Beispiel ohne Sonderzeichen</desc>
 <wpt lat="52.518611" lon="13.376111">
  <name>Reichstag (Berlin)</name>
 <wpt lat="48.208031" lon="16.358128">
  <name>Parlament (Wien)</name>
 <wpt lat="46.9466" lon="7.44412">
  <name>Bundeshaus (Bern)</name>
  <rtept lat="52.0" lon="13.5">
   <name>rtept 1</name>
  <rtept lat="49" lon="12">
   <name>rtept 2</name>
  <rtept lat="47.0" lon="7.5">
   <trkpt lat="52.520000" lon="13.380000">
   <trkpt lat="48.200000" lon="16.260000">
   <trkpt lat="46.95" lon="7.4">
   <trkpt lat="47.2" lon="7.41">
   <trkpt lat="52.53" lon="13.0">

The example was validated with the Xerces software , but different display programs (e.g. Google Earth ) may show different representations because the elements were deliberately completely attributed differently.


As an XML dialect, the GPX format allows you to embed your own extensions, although these are not part of the GPX schema. One example is the GPX extensions from Garmin .

See also

Web links

Individual evidence

  1. GPX 1.1 Schema Documentation., accessed on November 7, 2017 (English).
  2. Garmin GPX Extensions Format v3. Garmin, accessed May 16, 2017 .