itacart.interop.geometry_to_geojson
- itacart.interop.geometry_to_geojson(geometry)[source]
Serialise arbitrary geometry, cutting it at the antimeridian.
This is the export path for geometry that did not come from the grid. Anything that occupies both sides of the seam is split per RFC 7946 section 3.1.9 so that no part crosses it. Polar caps are not handled here; they are a cell concern and have their own routine.
- Parameters:
geometry (
BaseGeometry) – Any Shapely polygon in WGS84 degrees.- Return type:
- Returns:
A GeoJSON geometry dictionary.
- Raises:
GeometryError – If the geometry type is not supported.