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#
Create the GPXParser
Parse a GPX document using the GPXParser
Convert the document to waypoints, tracks, or routes
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!