Parse and normalize a GeoJSON area of interest, using pure Python.
Project description
GeoJSON AOI Parser
Parse and normalize a GeoJSON area of interest, using pure Python.
📖 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geojson_aoi_parser-0.2.0.tar.gz.
File metadata
- Download URL: geojson_aoi_parser-0.2.0.tar.gz
- Upload date:
- Size: 63.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.9.3 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbc9be1f1f5df8fb0712e8b9474b2e2ebcf9d36ef19093304ed94dfe61884dfb
|
|
| MD5 |
122587ef0a2da9a6bea78d2dc2f28749
|
|
| BLAKE2b-256 |
0ae641a83786186250c0412b3e06d71ac61d36c306f5f4a1814e6bb172d5887d
|
File details
Details for the file geojson_aoi_parser-0.2.0-py3-none-any.whl.
File metadata
- Download URL: geojson_aoi_parser-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.9.3 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fcfec222b16856ef9e7c41e75f029cd2f7a555fa0816dc70a42dce5d92b0a29
|
|
| MD5 |
6e7e78d6e5959d1569bc34df146d3d5b
|
|
| BLAKE2b-256 |
203d35d8d29c86f9422e2483859ed3dfc039d3a01227d8a230b97e3e6970415e
|