jts icon indicating copy to clipboard operation
jts copied to clipboard

Add NearestNeighbor to KdTree?

Open scaddenp opened this issue 4 years ago • 2 comments

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).

scaddenp avatar Jul 22 '21 02:07 scaddenp

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.

dr-jts avatar Jul 22 '21 17:07 dr-jts

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.

scaddenp avatar Jul 22 '21 21:07 scaddenp