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 NearestNeighbor to KdTree? #758

Open
scaddenp opened this issue Jul 22, 2021 · 2 comments
Open

Add NearestNeighbor to KdTree? #758

scaddenp opened this issue Jul 22, 2021 · 2 comments

Comments

@scaddenp
Copy link

The KdTree implementation here - https://github.com/Voidious/Diamond/blob/master/ags/utils/dataStructures/trees/thirdGenKD/KdTree.java
has a NearestNeighbour search. How hard would that be to port into JTS?

I tried NN with STRtree but performance was terrible compared to KdTree for query (on 500k 2D points).

@dr-jts
Copy link
Contributor

dr-jts commented Jul 22, 2021

Great idea! A PR would be welcome. Otherwise it can go on the backlog.

Good to hear that the KdTree implementation is getting a good workout.

@scaddenp
Copy link
Author

Well knowing that a PR would be welcome is an incentive, but on my long backlog too. I am pretty happy with KdTree. Doing things like finding all points "close" to a series of line segments with it and a souped-up version of Barnes Surface interpolation.

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

No branches or pull requests

2 participants