Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
Esridump
https://pypi.org/project/esridump/
Admin
esridump scrapes Esri REST endpoints to dump geodata and write GeoJSON files.
Tokens:
1,124
Snippets:
18
Trust Score:
10
Update:
3 months ago
Context
Chat
Benchmark
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Install Development Dependencies with Pipenv Source: https://pypi.org/project/esridump Install project dependencies for development using Pipenv. Ensure Pipenv is installed first, then run this command within the project directory. ```bash pipenv install --dev pipenv shell ``` -------------------------------- ### Install esridump using pip Source: https://pypi.org/project/esridump Install the esridump package within a virtual environment using pip. This is the recommended method for using the command-line tool. ```bash virtualenv esridump source esridump/bin/activate pip install esridump ``` -------------------------------- ### Run Tests with Nosetests Source: https://pypi.org/project/esridump Execute tests to verify code changes. This command should be run from within the Pipenv virtual environment. ```bash nosetests ``` -------------------------------- ### Clone esridump Repository Source: https://pypi.org/project/esridump Clone the esridump repository locally to suggest changes or improvements. Replace the placeholder with your GitHub fork URL. ```bash git clone git@github.com:openaddresses/pyesridump.git # replace with your fork cd pyesridump ``` -------------------------------- ### Convert Esri REST endpoint to GeoJSON using CLI Source: https://pypi.org/project/esridump Use the `esri2geojson` command-line utility to convert an Esri REST layer endpoint URL to a GeoJSON file. The output can be written to a file or stdout. ```bash esri2geojson http://cookviewer1.cookcountyil.gov/ArcGIS/rest/services/cookVwrDynmc/MapServer/11 cookcounty.geojson ``` -------------------------------- ### Extract all GeoJSON features into a list using Python Source: https://pypi.org/project/esridump Use the `EsriDumper` class to retrieve all GeoJSON features from an Esri REST endpoint and store them in a Python list. ```python from esridump.dumper import EsriDumper d = EsriDumper('http://example.com/arcgis/rest/services/Layer/MapServer/2') # Or get all features in one list all_features = list(d) ``` -------------------------------- ### Extract GeoJSON features iteratively using Python Source: https://pypi.org/project/esridump Use the `EsriDumper` class to iterate over GeoJSON features from an Esri REST endpoint. Each feature is printed as a JSON string. ```python import json from esridump.dumper import EsriDumper d = EsriDumper('http://example.com/arcgis/rest/services/Layer/MapServer/1') # Iterate over each feature for feature in d: print(json.dumps(feature)) ```