UNPKG

ogr-json-stream

Version:

Transform stream that takes in ogr2ogr GeoJSON and spits out features from a feature colelction.

9 lines (6 loc) 279 B
Stream the GeoJSON feature collection output of ogr2ogr as individual features. spawn('ogr2ogr', ['-f, 'GeoJSON' '/vsistdout/', 'somefile.shp']) .pipe(OgrJsonStream()) .on('data', function(feature){ //individual features here, as objects });