Skip to content

BUG: fix potential TopologyException in GDAL

Guillaume Pasero requested to merge fix_topology_exception into develop

This error happened on debian tests: https://cdash.orfeo-toolbox.org/testDetails.php?test=10129083&build=13836

It is caused by an invalid polygon, produced by GDAL_polygonize. This polygon has a common vertice occuring twice in the exterior ring (and no interior ring).

poly

During the polygon merging step, I have added a check to detect invalid geometries. I try to simplify the invalid polygon before adding it to a multipolygon.

In the example shown, the simplification creates a new polygon with an inner ring for the hole.

Merge request reports

Loading