GPXParser#

GPX is a data format for the interchange of GPS data (waypoints, routes, tracks) between applications and Web services on the Internet [1]. Modern devices, such as activity trackers, often store GPS data in GPX files. GPXParser provides utilities for parsing GPX files.

Note

Want a hands-on example of how to use GPXParser? Try out the Tutorial!


Using GPXParser#

  1. Create the GPXParser

  2. Parse a GPX document using the GPXParser

  3. Convert the document to waypoints, tracks, or routes

  4. Perform some operations on the resulting structures


Example#

import gpsutils

gpxfile = open('test.gpx', 'r')

gpxparser = gpsutils.GPXParser()
gpxparser.parse(gpxfile)

waypoints = gpxparser.gpx.waypoints
tracks = gpxparser.gpx.tracks
routes = gpxparser.gpx.routes

Where to go from here?#

Check out the GPXParser API Reference

Try out the Tutorial if you haven’t already!