GPS eXchange Format (GPX) Reader/Writer

Licensing options for this format begin with FME Professional Edition.

Overview

GPX (the GPS Exchange Format) is a lightweight XML data format for the interchange of GPS data (waypoints, routes, and tracks) between applications and Web services on the Internet.

FME can read both GPX 1.0 and GPX 1.1, and write GPX 1.1.

The GPXX plug-in natively handles reading and writing of some Garmin GPX extensions. Extensions that are not natively handled will be read/written as XML fragments.

For more information, please go to:

http://www.topografix.com/gpx.asp

Reader Overview

The GPX reader supports reading GPX 1.0 and 1.1 datasets. In addition, the reader has support for certain Garmin GPX extensions. The reader will handle which use the following XML namespaces:

Extensions in other XML namespaces will be read / written as XML fragments.

The GPX reader will always produce six feature types: Metadata, WayPoint, Route, RoutePoint, Track, and TrackPoint. The details of these feature types are described in Feature Types.

The reader will produce WayPoint features with point geometry.

Route features will have line geometries, and Tracks will have line or multi-line geometries. Route and Track features will only contain attributes related to the Route/Track as a whole. They will not contain attributes related to the individual points along the line. Each Route and Track feature will have a unique id, stored in the route_id or track_id attribute.

The reader will produce a RoutePoint/TrackPoint feature for each point along the Route / Track. These features will have attributes related to the individual points.

The reader will produce a RoutePoint feature for each point along a route. These features will have attributes related to the individual points on the track. Each RoutePoint feature will have a route_id attribute which identifies the route it belongs to. In addition, RoutePoint features will have a route_point_index attribute which identifies the point’s position in the route.

Note: The reader will produce a TrackPoint feature for each point along a track. These features will have attributes related to the individual points on the track. Each TrackPoint feature will have a track_id attribute which identifies the track it belongs to, and a track_segment which indicates which segment of the track it belongs to. In addition, each TrackPoint feature will have a track_segment_point_index attribute which identifies the point’s position in the segment.

Coordinate Systems

The GPX reader supports data in decimal degrees (WGS84 datum).

Writer Overview

The GPXX writer supports writing GPX 1.1 datasets. The writer expects FME Features that it receives to be formatted in a specific format. The formats are described in Fixed Schema and Feature Representation.

The GPXX writer accepts only one Metadata feature; all other Metadata features are ignored and a warning is logged.

WayPoint features must have point geometry, or they will be ignored. The elevation attribute on WayPoint features will be ignored. Instead, the z-value of the point geometry will be used.

Route and Track features are handled according to the following process:

  1. If the Route / Track has a route_id / track_id attribute, its geometry will be ignored. The route / track geometry will be written out based on the RoutePoint / TrackPoint features which share the same route_id / track_id value.
  2. If the Route / Track has no route_id / track_id attribute, the geometry will be split up into RoutePoint / TrackPoint features. These point features will have no attribution.

RoutePoint and TrackPoint features will be ignored if there is no corresponding Route / Track feature with the same route_id / track_id attribute value, or if they do not have point geometry. The elevation attribute on RoutePoint and TrackPoint features will be ignored. Instead, the z-value of the point geometry will be used.

RoutePoint features will be sorted according to the value of their route_point_index attribute. If this attribute is not present, the features will be written out in the order they arrive at the writer. If some features have the route_point_index attribute and some do not, the features with the attribute will be written first, then those without the attribute.

TrackPoint features will be grouped based on the value of the track_segment attribute. Features with the same track_segment value will be written out as a single track segment. All features which don't have a track_segment value will be grouped into a single segment. Within each segment, features will be sorted according to the value of their track_segment_point_index attribute. If this attribute is not present, the features will be written out in the order they arrive at the writer. If some features have the track_segment_point_index attribute and some do not, the features with the attribute will be written first, followed by those without the attribute.

Coordinate Systems

The GPXX writer will only write data in decimal degrees (WGS84 datum). This is the EPSG:4326 coordinate system. All features passed to the writer will be reprojected to EPSG:4326 if this functionality is licensed. Features with no coordinate system are assumed to be in EPSG:4326.