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

As a Library

>>> 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'}

On the Console

# convert ArcGIS json file to GeoJOSN file
$ arcgis2geojson arcgis.json > geo.json

# fetch ArcGIS json from the web and convert to GeoJSON
$ curl "https://myserver.com/arcgis.json" | arcgis2geojson

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-2.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

arcgis2geojson-2.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arcgis2geojson-2.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.2 CPython/3.6.9 Linux/4.15.0-74-generic

File hashes

Hashes for arcgis2geojson-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1a65e9bddb9edbc5cb0446d691b134c5c3fcface06c99ceafe27f0dce4e61f7b
MD5 c98fa97e138e283c787e25cb04add816
BLAKE2b-256 9f2243f3021846b76da381208e47f95862f57a9ea66f54fccb97f33632648a3a

See more details on using hashes here.

File details

Details for the file arcgis2geojson-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: arcgis2geojson-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.2 CPython/3.6.9 Linux/4.15.0-74-generic

File hashes

Hashes for arcgis2geojson-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e333f6fe3360b709e46c936684d231967d47c699adb1f26c3ea1720737f727f8
MD5 13731b39193b1cb6fbb28f43c4b13610
BLAKE2b-256 1bf57fbbfd54216e4e1ea8de8e10e442218e87e37d2434d54f9b7907864b367c

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