Open-EO / openeo-geotrellis-extensions

Java/Scala extensions for Geotrellis, for use with OpenEO GeoPySpark backend.
Apache License 2.0
5 stars 4 forks source link

raster_to_vector creates artifacts due to tile regridding #253

Open JeroenVerstraelen opened 10 months ago

JeroenVerstraelen commented 10 months ago

Before converting the raster to vectors, the raster_to_vector method regrids the rdd to become one single tile (or multiple very large ones) if the rdd is too big: https://github.com/Open-EO/openeo-geotrellis-extensions/blob/master/openeo-geotrellis/src/main/scala/org/openeo/geotrellis/OpenEOProcesses.scala#L482

When raster_to_vector is used in the parcel delineation notebook it appears that this regridding causes artifacts to appear.

Input: raster_to_vector_input

Output: raster_to_vector_issue

jdries commented 10 months ago

I pushed a simple fix and improved the unit test. Still I noticed that vectorization did not seem to include the full original raster for some reason. Run the unit test modified in this issue to observe current behaviour!

jdries commented 2 months ago

Proposed solution: add some overlap to the tiles, then vectorize, then perform a union that merges overlapping polygons