What Is the GPX Format?

GPX stands for GPS Exchange Format, a format designed to exchange GPS data between different applications and devices. The format is based on XML, a structured language used to represent data organized through elements and attributes.

Unlike a proprietary format, a GPX file can be read and interpreted by many independent programs. This has made it one of the most widely used formats for transferring GPS tracks, waypoints and routes between computers, smartphones and GPS devices.

How Is a GPX File Structured?

A GPX file is normally a text document with the .gpx extension. Inside it, geographic data is organized in XML elements that describe points and their associated information.

The geographic coordinates of points are expressed as latitude and longitude. The GPX format uses the WGS84 reference system, regardless of the coordinate system or datum used when preparing the map on which the data was originally created or displayed.

A GPX file can contain multiple types of data at the same time. For example, the same file can include waypoints used as points of interest, a planned route and one or more recorded tracks.

Coordinates, Elevations and Date/Time

The GPX format defines some important conventions for representing geographic data. Latitude and longitude coordinates are referenced to WGS84 and are expressed in decimal degrees.

Elevation information is expressed in meters. This means that an elevation value contained in a GPX file should not be interpreted according to the unit of measurement originally used by the software that created the data.

Time information contained in GPX files is expressed in UTC. This makes it possible to exchange data between devices and applications located in different time zones without ambiguity about the instant at which a recording was made.

These conventions are particularly important when data is imported from software that uses a different coordinate system or different local settings. GPX is an exchange format with its own rules, not a copy of the cartographic settings used when the data was created.

Waypoints, Routes and Tracks

A GPX file can represent different types of data. Understanding the difference between these elements is essential for correctly interpreting data imported into GPS software.

  • Waypoint: identifies a single geographic point, such as a summit, shelter, parking area or other point of interest. It can contain coordinates, elevation, name, description and symbol.
  • Route: represents a sequence of points that defines a planned journey. Route points are used as directions or waypoints that the device or software can use to build or follow a route.
  • Track: represents an ordered sequence of points that describes a recorded path or a track to follow. It consists of successive points that describe the geometry of the path.

The distinction is particularly important because a route and a track can represent the same general journey but have different meanings. A route normally describes a journey through a sequence of significant points, while a track contains a succession of points that describes the geometry of the path in greater detail.

The Main Elements of a GPX File

The XML structure of the GPX format uses specific elements to represent different types of data. Among the most important are wpt, rte and trk.

  • wpt identifies a waypoint and contains the point's coordinates together with any associated information.
  • rte contains a route, normally consisting of a sequence of route points.
  • trk contains a track and can be divided into one or more segments using trkseg elements.

Individual track points are represented by trkpt elements, while route points are represented by rtept. This structure makes it possible to clearly distinguish the nature of the data contained in the file.

Elevations, Timestamps and Other Information

In addition to coordinates, a GPX file can contain additional information associated with individual points. This can include elevation, recording date and time, name, description and symbol.

The presence of this information depends on the device or software that created the file. A track recorded by a GPS device may, for example, contain an elevation and timestamp for numerous points, while a manually created file may contain only the coordinates needed to describe the path.

It is therefore normal for two GPX files containing an apparently identical track to have different sizes and different amounts of information. The track geometry may be the same, while elevations, timestamps, descriptions and other associated data may differ.

Does a GPX File Contain a Map?

No. A GPX file contains geographic data, but does not normally contain the map used to display it. Track or waypoint coordinates must be displayed on a map provided separately by the software or device.

This means that the same GPX file can be displayed on different maps. A track can be overlaid on a topographic map, road map, georeferenced raster map or other compatible types of cartography.

Format Versions and Extensions

The GPX format has been developed through several versions. The most common files use GPX 1.1, which is widely supported by modern GPS software and devices.

The standard defines the main elements of the format, but does not prevent manufacturers from adding supplementary information through specific extensions.

Proprietary Extensions and Compatibility

Some software and devices use proprietary extensions to store information that is not part of the standard GPX elements. This information may concern program-specific functions, settings, additional data or particular device features.

OkMap also uses its own extensions to preserve additional information that cannot be represented directly by the standard GPX elements.

This means that a GPX file can be perfectly valid and readable by another program, while some additional information may not be recognized. If a GPX file created or modified with OkMap is subsequently opened, modified and saved by another software, OkMap-specific information may be ignored or lost.

For this reason, when it is important to preserve all information associated with GPS data, it is advisable to check which elements are retained by the software used to import and subsequently export the file.

GPS Data Conversion

GPX is primarily an exchange format, but it is not the only format used to store and transfer GPS data. Different software and devices may use formats such as KML/KMZ, TCX, FIT, CSV, NMEA and numerous proprietary formats.

Converting between formats does not simply mean changing the file extension. Each format can represent different types of information and may support only part of the data available in the source format.

During a conversion, coordinates and track geometry may therefore be preserved, while some additional information, such as elevations, timestamps, symbols, metadata or proprietary extensions, may not be transferred.

OkMap provides numerous functions for importing, exporting and converting between GPS and geographic formats. These tools make it possible to adapt data to the software or device with which it needs to be used, taking into account the characteristics of the destination format.

Compatibility Between Software and Devices

The widespread use of the GPX format does not mean that all software and devices handle every element of the format in the same way. A program may correctly import tracks but ignore some additional information, while a device may support only a subset of the available functionality.

When transferring a GPX file between different applications, it is therefore advisable to check that the elements actually required are supported. This is particularly important for routes, information associated with waypoints and proprietary extensions.

Using GPX Files with OkMap

OkMap allows you to import, display and edit GPX data, managing tracks, waypoints and routes within the map. This makes it possible to analyze a recorded track, edit points, organize waypoints or prepare a route to be used later on a GPS device.

For GPS track analysis, you can use the tools described in the article GPS GPX Track Analysis and Management, while for route planning you can learn more in the article Planning GPX Routes for Hiking.

The ability to work with GPX data together with maps also makes it possible to compare tracks, waypoints and routes with different cartographic sources and other geographic data.