Upon trying to insert our STAC Items into a db via STAC-FastAPI we found out our STAC geometries were invalid.
This PR closes the LineRing and uses Shapely (already a dependency of the project) to validate the geometry, seems the STAC tooling itself doesn't validate the internal geometry..
How I did it
Modified src/hazard/inventory.py to close the LineRing and use shapely to validate the geom
Bumped the docker image in the CWL file as it's been re-built and pushed
What this PR does
Upon trying to insert our STAC Items into a db via
STAC-FastAPI
we found out our STAC geometries were invalid.This PR closes the
LineRing
and uses Shapely (already a dependency of the project) to validate the geometry, seems the STAC tooling itself doesn't validate the internal geometry..How I did it
src/hazard/inventory.py
to close theLineRing
and use shapely to validate the geomHow you can test it
See: https://github.com/developmentseed/os-climate-hazard/pull/19 where I provided a before + after.