GPX ( GPS eXchange Format ) is an XML- based, text-based format for storing and exchanging GPS data. GPX is a free format and can be used without any royalties.
GPX | |
---|---|
Expansion | |
MIME type | |
Published | |
Expanded from | |
Website |
The format allows you to store information about landmarks ( waypoints ), routes ( routes ) and tracks ( tracklogs ). For each point, its longitude , latitude and altitude are stored (if altitude information is available). For track points, the point travel time is also stored. The XML-scheme also provides for the storage of arbitrary user information at each point, only longitude and latitude are mandatory. Examples of user information can be terrain height (ele), speed, heart rate (hr), number of steps, cadence (cad), temperature, etc.
The format is accepted by many programs, including Google Earth and Ozi Explorer (see the official list here ). It should be noted that many programs, for example MapSource, lose user information.
Content
Versions
1.0 - The first publication of the format in 2002.
1.1 - Added some extensions, for example, allowing you to set the color of the track.
Example
<? xml version = "1.0" encoding = "UTF-8"?>
<gpx
xmlns = "http://www.topografix.com/GPX/1/1"
version = "1.1"
creator = "Wikipedia"
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" >
<time> 2011-09-22T18: 56: 51Z </time>
<metadata>
<name> Name </name>
<desc> Description </desc>
<author>
<name> Autor </name>
</author>
</metadata>
<trk>
<name> exercise </name>
<trkseg>
<trkpt lat = "59.934721667" lon = "30.310183333" >
<time> 2011-09-22T18: 56: 51Z </time>
<fix> 2d </fix>
<sat> 5 </sat>
</trkpt>
<trkpt lat = "59.934731667" lon = "30.310083333" >
<time> 2011-09-22T18: 56: 56Z </time>
<fix> 2d </fix>
<sat> 5 </sat>
</trkpt>
<trkpt lat = "59.934646667" lon = "30.309901667" >
<time> 2011-09-22T18: 57: 01Z </time>
<fix> 2d </fix>
<sat> 6 </sat>
</trkpt>
</trkseg>
</trk>
</gpx>
Units
The latitude and longitude in GPX is indicated in degrees in the WGS 84 coordinate system. Height is indicated in meters above sea level. For time, the UTC standard is used in the ISO 8601 format .
Data Types
Waypoint
Waypoint is indicated by the <wpt>
and means a separate waypoint, which is essentially a marker. Its coordinates are set by lat
and lon
attributes, height can be set by an optional <ele>
. A point can also contain other tags, for example, <name>
.
Route
The list of routes is indicated by the tag <rte>
- an ordered list of waypoints representing a series of turning points leading to the destination. In addition to the actual pivot points, <rtept>
may include a name, description, comment, links, and its own elements from another diagram.
Track
Track is a sequence of points with time <trk>
indicated by the <trk>
. It contains <trkseg>
elements (track segments), which in turn consist of points specified by the <trkpt>
. The coordinates of the track points are set similarly to the coordinates for the waypoint.
Attributes
Tag | Type of | Description |
---|---|---|
ele | xsd: decimal | Height in meters |
time | xsd: dateTime | UTC time in ISO 8601 format. Format: yyyy-mm-ddThh: mm: ssZ |
magvar | degreesType | Direction |
geoidheight | xsd: decimal | Height relative to geoid |
name | xsd: string | Title |
cmt | xsd: string | Comment |
desc | xsd: string | Description |
src | xsd: string | Source |
link | linkType | Link to detailed information |
sym | xsd: string | Presentation Symbol |
type | xsd: string | Classification (Type) |
fix | fixType | Way to determine the position (none, 2d, 3d, dgps, pps) |
sat | xsd: nonNegativeInteger | Number of satellites |
hdop | xsd: decimal | Horizontal dispersion |
vdop | xsd: decimal | Vertical dispersion |
pdop | xsd: decimal | Accuracy |
ageofdgpsdata | xsd: decimal | The time between receiving a message and calculating a position |
dgpsid | dgpsStationType: integer | DGPS station identifier |
extensions | extensionsType | Extensions |