Skip to content

elliotstokes/gpx-parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2a6310b · Mar 23, 2021
Feb 9, 2016
Aug 13, 2014
Mar 6, 2021
Oct 13, 2020
Aug 11, 2015
Jan 20, 2014
Jan 30, 2014
Aug 10, 2015
Feb 15, 2016
Feb 15, 2016
Feb 10, 2016
Aug 6, 2015
Aug 12, 2014
May 22, 2017

Repository files navigation

gpx-parse NPM Version Build Status Coverage Status Code Climate

A library for parsing gpx data. Works against most of the Gpx v1.0 spec and Gpx v1.1. Feel free to fork if you need something specific.

More information available on the Project Page

#Installation

$ npm install gpx-parse

#Or with bower

$ bower install gpx-parse

#Usage

The module has been designed to work within node but you can also use it on the client side using the browserfy version that can be found in the dist folder.

var gpxParse = require("gpx-parse");

//from file
gpxParse.parseGpxFromFile("/path/to/gpxFile", function(error, data) {
	//do stuff
});

//or from string
gpxParse.parseGpx("<gpx></gpx>", function(error, data) {
	//do stuff
});

// or an external file via HTTP(S)
gpxParse.parseRemoteGpxFile("http://host.tld/my.gpx", function(error, data) {
    //do stuff
});

#Tests

Tests are written with nodeunit. To test make sure you have the dev dependencies installed and just run:

$ npm test