5.2.0 • Published 24 days ago

esri-dump v5.2.0

Weekly downloads
5
License
MIT
Repository
github
Last release
24 days ago

Based On PyEsriDump by @iandees

Install

npm install -g esri-dump

API

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

import EsriDump from 'esri-dump';
const esri = new EsriDump(url);

const  featureCollection = {
  type: 'FeatureCollection',
  features: []
}

esri.fetch();

esri.on('type', (type) => {
    //Emitted before any data events
    //emits one of
    // - `MapServer'
    // - `FeatureServer'
});

esri.on('feature', (feature) => {
    featureCollection.features.push(feature);
});

esri.on('done', () => {
    doSomething(null, featureCollection)
});

esri.on('error', (err) => {
    doSomething(err);
});

Command Line

Streams a geojson feature collection to stdout

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

Data Output

FeatureServer and MapServer

Output from an ESRI FeatureServer or an ESRI MapServer is returned as GeoJSON as in the example below.

{
    "type": "Feature",
    "properties": {
        "objectid": 1
    },
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [
                    -65.6231319,
                    31.7127058
                ],
                [
                    -65.6144566,
                    31.7020286
                ],
                [
                    -65.6231319,
                    31.698692
                ],
                [
                    -65.6231319,
                    31.7127058
                ]
            ]
        ]
    }
}

Development

esri-dump is written in TypeScript. To compile it locally, run:

npx tsc

See /dist for the compiled code.

5.2.0

24 days ago

5.1.0

6 months ago

5.0.0

6 months ago

4.6.2

6 months ago

4.5.0

7 months ago

4.6.1

6 months ago

4.6.0

6 months ago

3.2.1

8 months ago

4.4.1

7 months ago

4.3.2

7 months ago

4.4.0

7 months ago

4.3.1

8 months ago

4.3.0

8 months ago

4.2.1

8 months ago

4.2.0

9 months ago

3.1.0

10 months ago

4.0.0

10 months ago

4.1.1

9 months ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.0

1 year ago

0.4.3

7 years ago

0.4.1

7 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago