Skip to main content

Parse and normalize a GeoJSON area of interest, using pure Python.

Project description

GeoJSON AOI Parser

HOT

Parse and normalize a GeoJSON area of interest, using pure Python.

Publish Docs Publish Test Package version Downloads License


📖 Documentation: https://hotosm.github.io/geojson-aoi-parser/

🖥️ Source Code: https://github.com/hotosm/geojson-aoi-parser


Why do we need this?

  • We generally need an Area of Interest (AOI) specified for software to run on a geospatial area.
  • GeoJSON is a simple exchange format to communicate this AOI.
  • We only care about Polygon data types, but GeoJSON data can be quite variable, with many options for presenting data.
  • The goal of this package is to receive GeoJSON data in various forms, then produce a normalised output that can be used for further processing.

Priorities

  • Flexible data input: file bytes, dict, string JSON.
  • Flexible geometry input:
    • Polygon
    • MultiPolygons
    • Feature
    • FeatureCollection
  • Handle multigeometries with an optional merge to single polygon, or split into featcol of individual polygons.
  • Handle geometries nested inside GeometryCollection*.
  • Remove any z-dimension coordinates.
  • Warn user if CRS is provided, in a coordinate system other than EPSG:4326.
  • Normalised output: FeatureCollection containing Polygon geoms.

[!WARNING]
*We typically advise against using the GeometryCollection type, and support in this library may not be fully functional.

However sometimes geometries may need to be returned wrapped in GeometryCollection, for example due to idiosyncrasies of PostGIS.

In this scenario, we support stripping out the first geometry from inside each GeometryCollection object (that may be nested in a FeatureCollection).

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

geojson_aoi_parser-0.1.0.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geojson_aoi_parser-0.1.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file geojson_aoi_parser-0.1.0.tar.gz.

File metadata

  • Download URL: geojson_aoi_parser-0.1.0.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.15

File hashes

Hashes for geojson_aoi_parser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ce7b26bfacf1a915620f485089517ef1d8490bf162b178ddfcdd3572b1f856cd
MD5 ee045f01865454ce1337e00583df5b8e
BLAKE2b-256 7e2f3b757c4d0d605453f0bd88ace1b67f5fe83014e38f897128d9e57b3a5e03

See more details on using hashes here.

File details

Details for the file geojson_aoi_parser-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geojson_aoi_parser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3aca81a40bb966c05fc508da34d915dbce45ea159683495016cc5b85768949f9
MD5 5320fe37bd8ae8ea9cc56b9626e5ac49
BLAKE2b-256 58c72af36fe1f6bdf616c9639947c839fc6eb751696c4834dd211f984ba832ad

See more details on using hashes here.

Supported by

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