gpx2json
v0.0.5
Published
Simple GPX to JSON converter
Downloads
4
Readme
gpx2json
Simple GPX to JSON converter
Example Code
var gpx2json = require('gpx2json'),
fs = require('fs');
var filename = process.argv[2];
if (!filename) {
console.log("Param 1 should be a GPX file");
} else {
fs.stat(filename, function(err, stat) {
if (err) {
console.log("Error opening file (" + filename + ")");
console.log(err.code);
} else {
gpx2json.parseGPXFile(filename, function(err, data) {
console.log(JSON.stringify(data, null, 2));
});
}
});
}