gpx-stream

0.0.3 • Public • Published

gpx-stream

NPM

Stream tracked points (<trkpt/> nodes) from a GPX 1.1 input string.

Usage

 
var gpx = require('gpx-stream');
var points = new gpx();
var source = fs.createReadStream('./oregon.gpx');
 
source.pipe(points);
 
points.on('readable', function(){
  var point;
 
  while(point = points.read()){
    console.log([
      'Lat:', point.lat,
      'Lon:', point.lon,
      'elevation:', point.elevation,
      '@time', point.time
    ].join(' '));
  }
});
 
points.on('end', function(){
  console.log('finished');
});
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    21
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    21
  • 0.0.2
    2
  • 0.0.1
    3

Package Sidebar

Install

npm i gpx-stream

Weekly Downloads

7

Version

0.0.3

License

BSD

Last publish

Collaborators

  • maciek416