locationtech / jts

The JTS Topology Suite is a Java library for creating and manipulating vector geometry.
Other
1.99k stars 443 forks source link

Fix CoveragePolygonValidator to detect segment-equal covering polygons #965

Closed dr-jts closed 1 year ago

dr-jts commented 1 year ago

This fixes CoveragePolygonValidator to detect covering polygons with all equal segments. It does this by taking into account segment orientation. Segments with identical orientation (in normalized polygons) indicate an invalid coverage, since the parent polygons must overlap.

This also detects duplicate polygons, which allow removing the special check for this situation.

Performance is similar to the old code, and may even be improved in some situations.