Open-EO / openeo-python-driver

Common parts of a Python driver implementation for OpenEO
Apache License 2.0
11 stars 6 forks source link

auto-convert incoming geojson to vectorcube #328

Closed jdries closed 1 day ago

jdries commented 4 days ago

For consistent and correct handling of geometry in our backend, we need vector cubes. This code path was still emitting shapely geometry objects, for no clear/good reason, causing unexpected behaviour: https://github.com/VITO-RS-Vegetation/lcfm-production/issues/88

The error logs show clearly that geometry with different CRS's was incorrectly combined when vector cubes are not used.

Next to that, annoying messages were printed in the logs:

geojson_to_geometry usage is deprecated and should be replaced by proper vector cube usage
_normalize_geometry: TODO are we still reaching this code?

This pr suggests to get rid of all that via a simple translation to vector cube, which is a code path with much better support and normally also test coverage.

@soxofaan @JeroenVerstraelen I can add a unit test, but would first like to learn if there were reasons to not do this?

jdries commented 1 day ago

Tests fixed, coverage seemed to be good already. I'll merge if no objections?