Open-EO / openeo-geotrellis-extensions

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

raster_to_vector creates artifacts due to tile regridding #253

Open JeroenVerstraelen opened 6 months ago

JeroenVerstraelen commented 6 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 5 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!