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

Performance improvement #138

Closed
wants to merge 2 commits into from
Closed

Conversation

doskabouter
Copy link
Contributor

@doskabouter doskabouter commented Dec 4, 2018

First check envelope before calling CGAlgorithms::isPointInRing

Performance of st_intersection went from 15.8 to 11.5 seconds for these polygons:
Polygons.zip

It can be improved even more, but not familiar enough with the code to do that right now.
When calculating the st_intersection, there were still 8526 calls to isPointInRing for a polygon with 5 points, and 4262 calls to isPointInRing for a polygon with 130327 points so perhaps a IndexedPointInAreaLocator or a SIRtreePointInRing can be added to the OverlayOp::computeLabelling() so that it can be used in EdgeEndStar::getLocation

@dr-jts
Copy link
Contributor

dr-jts commented Dec 5, 2018

Interestingly, this performance improvement has been in JTS for a long time. So not sure why it wasn't ported.

Also, this class is still out of synch with the current JTS code, although not sure how much that matters.

@doskabouter doskabouter closed this Dec 9, 2018
@doskabouter
Copy link
Contributor Author

Accidentally added more commits...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants