esri-dump

Assist with pulling data out of an ESRI ArcGIS REST server into a more useful format.

esri-dump

A Node module to assist with pulling data out of an ESRI ArcGIS REST server into GeoJSON.

This is based on Python code I wrote to do the same thing.

npm install -g esri-dump

exposes a function, which if you give it a url, will return a stream of the geojson features.

var esriDump = require("esri-dump");
var jsonStream = esriDump(url);
var featureCollection = {
  type: 'FeatureCollection',
  features: []
}
jsonStream.on('data', function (feature) {
    featureCollection.features.push(feature);
});
jsonStream.on('end', function () {
    doSomething(null, featureCollection)
});
jsonStream.on('error', function (err) {
    doSomething(err);
});

Streams a geojson feature collection to stdout

esri-dump http://services2.bhamaps.com/arcgis/rest/services/AGS_jackson_co_il_taxmap/MapServer/0 > output.geojson