Closed bossie closed 1 year ago
Good point. What do you think should happen? Throw an error? Empty geometry?
We were a bit unsure:
We now throw an error, but would be better if we can also make it somehow work for this case.
Yes, I'd need input from the different back-ends so that we standardize what the tooling actually does or what makes most sense, i.e. find hopefully a common denominator. Otherwise, throwing an error is always the last resort.
Details for VITO: https://github.com/Open-EO/openeo-python-driver/issues/164
Why is it an issue in downstream processes to have empty geometries/coordinates? @jdries In the discussion it sounds like the preferrable option would be to handle empty geometries. We were not sure what the downstream issues are.
GeoJSON supports empty geometries/coordinates.
Handling empty geometries everywhere is indeed an option, perhaps also the best one as it would result in least errors for the users. The main issue with it is that a lot of existing (open source) implementations do not support empty geometries, and thus errors are thrown, often badly readable. Hence, openEO backend implementors will have to add explicit support in all vector processes.
@jdries Thanks. Which implementations are this? In the call it seemed people were at least not so concerned about the Python ecosystem. Spark?
For us, it's a mixture of Python and Scala (geotrellis), but I don't think it can be linked to an ecosystem. In general, it's safe to assume that there will for sure exist implementations that do not deal well with it, and it needs to be tested case by case. So in any case, we can perhaps move forward with documenting handling of empty geometries in vector cubes?
Do you mean on a case-by-case basis per process? Or generally in openEO? For the latter I'm not sure what we could document apart from that maybe empty geometries should be supported and if not, they get removed or so?
On a per-process basis:
Sounds good?
edit: add a general comment about empty geometries to the data cube introduction/glossary.
Process ID: vector_buffer
Describe the issue: We've run into this edge case where applying a negative buffer to a small polygon resulted in an empty (shapely) polygon. It's not clear what the result of this process should be.
Additional context: https://github.com/Open-EO/openeo-geopyspark-driver/issues/314