Convert TCX files to GeoJSON in JavaScript.
npm install tcx
Standalone:
https://raw.github.com/mapbox/tcx/master/tcx.js
var parse = require('tcx');
// a tcx file dom, via xmldom
parse(tcxDom);
Given a DOM of TCX data either as a browser DOM object or via xmldom
or
jsdom
, parse and return a GeoJSON FeatureCollection object.
npm install tcx -g
Usage with pipes:
$ tcx < tcxfile.tcx > geojsonfile.geojson
Or with filenames
$ tcx tcxfile.tcx anothertcxfile.tcx > output.geojson