GPX Parser
•
1 minute read
Overview
A library for parsing GPX files and extracting data with the following functions:
- Extract metadata and waypoints
- Extract tracks and routes with points and total distance
- Convert GPX to GeoJSON
Installation
npm i gpxtojs
Usage
const gpxtojs = require("gpxtojs")
const gpx = new gpxtojs.GPXParser();
gpx.parse(gpxString)
gpx.getMetadata()
gpx.getWaypoints()
gpx.getTracks()
gpx.getRoutes()
Convert to GeoJSON
gpx.toGeoJson()