TopologyException in UnaryUnion with collection of valid geometries in input
|Reported by:||strk||Owned by:||strk|
I found a case in which unary unioning a collection of valid polygons results in a failure due to CascadedPolygonUnion giving an invalid (self-intersecting) result.
The problem is in CascadedPolygonUnion::unionUsingEnvelopeIntersection wrongly assuming that unionActual will not move any segment, which instead happens due to robustness issues triggering various snapping/precision-reduction heuristics.
The wrong assumption is also in JTS, and was reported here: https://github.com/locationtech/jts/issues/104