Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CoveragePolygonValidator section performance optimization #1099

Merged
merged 4 commits into from
May 23, 2024

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented May 22, 2024

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.

Port of locationtech/jts#1053

World Polygons G99_5

Statistics: 323 geometries, 329,373 polygons, 459,540 vertices
Old code: 1579 ms
New code: 400 ms

World Polygons G65

Statistics: 323 geometries, 319,646 polygons, 27,706,942 vertices
Old code: 5308 s
New code: 59 s

@dr-jts dr-jts added JTS Issue also appears in JTS Enhancement New feature or feature improvement. labels May 22, 2024
@dr-jts dr-jts requested a review from dbaston May 22, 2024 20:57
src/coverage/CoveragePolygon.cpp Show resolved Hide resolved
src/coverage/CoveragePolygon.cpp Outdated Show resolved Hide resolved
src/coverage/CoveragePolygon.cpp Outdated Show resolved Hide resolved
src/coverage/CoveragePolygon.cpp Outdated Show resolved Hide resolved
src/coverage/CoveragePolygon.cpp Outdated Show resolved Hide resolved
src/coverage/CoveragePolygonValidator.cpp Outdated Show resolved Hide resolved
src/coverage/CoveragePolygonValidator.cpp Outdated Show resolved Hide resolved
include/geos/coverage/CoveragePolygon.h Outdated Show resolved Hide resolved
include/geos/coverage/CoveragePolygon.h Outdated Show resolved Hide resolved
include/geos/coverage/CoveragePolygon.h Outdated Show resolved Hide resolved
@dr-jts dr-jts merged commit 66beb41 into libgeos:main May 23, 2024
29 checks passed
@dr-jts dr-jts deleted the opt-coverage-validate branch May 23, 2024 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or feature improvement. JTS Issue also appears in JTS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants