locationtech / jts

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

Add CoveragePolygonValidator section performance optimization #1053

Closed dr-jts closed 6 months ago

dr-jts commented 6 months ago

Improves the performance of CoveragePolygonValidator and CoverageValidator by adding logic to avoid testing sections of ring vertices if the entire section does not overlap the target adjacent polygon.

Performance comparison:

World Polygons G99_5 Statistics: 323 geometries, 329,373 polygons, 459,540 vertices Old code: 2646 ms New code: 937 ms

World Polygons G65 Statistics: 323 geometries, 319,646 polygons, 27,706,942 vertices Old code: 11809 s New code: 103 s