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

Improve KdTree query to avoid recursion #779

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Oct 4, 2021

QGIS-45226 reported a Stack Overflow error during KdTree query. PR GEOS-481 fixed this in GEOS by changing the recursive query code to use an explicit stack.

This PR implements the same fix for JTS, replacing KdTree query recursion with the use of an explicit stack. It also contains refactoring to clarify the query code and the semantics of KdTree nodes.

Signed-off-by: Martin Davis mtnclimb@gmail.com

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@dr-jts dr-jts self-assigned this Oct 4, 2021
@dr-jts dr-jts merged commit 886eeb4 into locationtech:master Oct 4, 2021
@dr-jts dr-jts deleted the improve-kdtree-query branch October 4, 2021 23:54
@jodygarnett jodygarnett added this to the 1.19.0 milestone Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants