{"id":19816970,"url":"https://github.com/geoadmin/lib-esrijson","last_synced_at":"2025-05-01T10:33:20.456Z","repository":{"id":21879880,"uuid":"94313861","full_name":"geoadmin/lib-esrijson","owner":"geoadmin","description":"Parser of the infamous ESRI GeoJSON","archived":false,"fork":false,"pushed_at":"2023-12-11T14:40:55.000Z","size":35,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-23T12:03:30.787Z","etag":null,"topics":["esri","geometry","managed-by-tf","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoadmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-14T09:29:04.000Z","updated_at":"2025-01-22T03:47:20.000Z","dependencies_parsed_at":"2024-11-12T10:11:26.428Z","dependency_job_id":"e0e63dfb-2758-49b9-8fb4-9e80ea6dfe13","html_url":"https://github.com/geoadmin/lib-esrijson","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.15625,"last_synced_commit":"b16171266ec00db6d0959bf66c869d0f3dfa03af"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Flib-esrijson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Flib-esrijson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Flib-esrijson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Flib-esrijson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoadmin","download_url":"https://codeload.github.com/geoadmin/lib-esrijson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251860593,"owners_count":21655772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esri","geometry","managed-by-tf","python"],"created_at":"2024-11-12T10:11:16.782Z","updated_at":"2025-05-01T10:33:20.185Z","avatar_url":"https://github.com/geoadmin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"esrijson\n========\n\n[![Build Status](https://travis-ci.org/geoadmin/lib-esrijson.svg?branch=master)](https://travis-ci.org/geoadmin/lib-esrijson)\n\n\nIntroduction\n------------\n\nThis module is meant to build a bridge between GDAL `__geo_interface__` property via [Shapely](https://github.com/Toblerity/Shapely).\nThere is no concept of `GeometryCollection` in esrijson syntax, so there is only a limited support for this concept. Currently, we only take the first geometry and drop the rest.\nThis library is heavily inspired by [python-geojson](https://github.com/frewsxcv/python-geojson).\n\nUsage\n-----\n\n```python\nimport esrijson\nfrom shapely import geometry\n\n# Create an esrijson feature\nfeat = esrijson.Feature(geometry=geometry.Point(1, 4), attributes={'name': 'dummy', 'val': 1}, wkid=2056)\n# Dump to json\ndumped = esrijson.dumps(feat)\n# Load to Feature back again\nloaded = esrijson.loads(dumped)\nprint(loaded)\nprint(type(loaded))\n\n\u003e\u003e\u003e {'geometry': {'y': 4.0, 'x': 1.0}, 'spatialReference': {u'wkid': 2056}},'attributes': {u'name': u'dummy', u'val': 1}}\n\u003e\u003e\u003e \u003cclass 'esrijson.feature.Feature'\u003e\n\n# You can also transform an esri json like object into a shapely object\ngeom = esrijson.to_shape({\"paths\": [[[0.0, 0.0], [1.0, 1.0]], [[-1.0, 0.0], [1.0, 0.0]]]})\nprint(getattr(geom, '__geo_interface__')\n\n\u003e\u003e\u003e {'type': 'MultiLineString', 'coordinates': (((0.0, 0.0), (1.0, 1.0)), ((-1.0, 0.0), (1.0, 0.0)))}\n\n# And of your do the same operation back again\nesri_geom = esrijson.from_shape(geom)\nprint(esri_geom)\n\u003e\u003e\u003e {'paths': (((0.0, 0.0), (1.0, 1.0)), ((-1.0, 0.0), (1.0, 0.0)))}\n```\n\nESRI specs references\n---------------------\n\n- [Geometry Object](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000n1000000)\n- [Feature Object](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Feature_object/02r3000000n8000000/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Flib-esrijson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoadmin%2Flib-esrijson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Flib-esrijson/lists"}