Add NearestNeighbor to KdTree?
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).
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.
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.