os-climate / hazard

Onboarding, creation and transformation of climate hazard models for OS-Climate
Apache License 2.0
8 stars 12 forks source link

fix: fix issue where STAC Geometry wasn't a closed LineRing #130

Open ciaransweet opened 2 weeks ago

ciaransweet commented 2 weeks ago

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

How you can test it

See: https://github.com/developmentseed/os-climate-hazard/pull/19 where I provided a before + after.