pykdtree icon indicating copy to clipboard operation
pykdtree copied to clipboard

Why sometimes it returns the same neighbor multiple times

Open zyxue opened this issue 5 years ago • 5 comments

image

As seen in the first row, 460448, 441197, 83629, 208359 are returned twice, what could be the reason, please?

zyxue avatar May 09 '19 23:05 zyxue

This problem becomes much more serious when k=100

zyxue avatar May 10 '19 00:05 zyxue

Just curious and just a guess, but are your input lng/lat points unique? I wonder if some of them are repeated and that's confusing the kdtree.

djhoese avatar May 10 '19 01:05 djhoese

yes, they're unique. I switched to scipy.spatial.KDTree, and not seeing the same problem.

zyxue avatar May 10 '19 04:05 zyxue

@storpipfugl any idea ?

mraspaud avatar May 10 '19 06:05 mraspaud

pykdtree has been validated against scipy.spatial.KDTree so disagreement of results is unexpected. @zyxue : Is it possible for you to provide a minimal data set that reproduces the problem?

storpipfugl avatar May 13 '19 18:05 storpipfugl