Skip to main content

A Python library for converting ArcGIS JSON to GeoJSON

Project description

Build Status Coverage Status PyPI Version License Python Support

arcgis2geojson.py

A Python library for converting ArcGIS JSON to GeoJSON: A partial port of ESRI’s arcgis-to-geojson-utils.

Installation

pip install arcgis2geojson

Usage

>>> input = {
...     'attributes': {'OBJECTID': 123},
...     'geometry': {   'rings': [   [   [41.8359375, 71.015625],
...                                      [56.953125, 33.75],
...                                      [21.796875, 36.5625],
...                                      [41.8359375, 71.015625]]],
...                     'spatialReference': {'wkid': 4326}}}
>>> from arcgis2geojson import arcgis2geojson
>>> output = arcgis2geojson(input)
>>> import pprint
>>> pp = pprint.PrettyPrinter(indent=4)
>>> pp.pprint(output)
{   'geometry': {   'coordinates': [   [   [41.8359375, 71.015625],
                                           [56.953125, 33.75],
                                           [21.796875, 36.5625],
                                           [41.8359375, 71.015625]]],
                    'type': 'Polygon'},
    'id': 123,
    'properties': {'OBJECTID': 123},
    'type': 'Feature'}

Licensing

arcgis2geojson is a derivative work of ESRI’s arcgis-to-geojson-utils. Original code is Copyright 2015 by Esri and was licensed under the Apache License, Version 2.0.

arcgis2geojson is made available under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arcgis2geojson-1.1.1.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file arcgis2geojson-1.1.1.tar.gz.

File metadata

File hashes

Hashes for arcgis2geojson-1.1.1.tar.gz
Algorithm Hash digest
SHA256 e758cc377363781699f2713e20e5070453f6b159956aa2e4e3d737d6a9792c6b
MD5 334c4838f2397cd06c5463dced841ccb
BLAKE2b-256 f7a910708c6dce1d1d268d2c408359dc76549c77990c9130af9f536d05a29c8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page