[Numpy-discussion] finding close together points.

Christopher Barker Chris.Barker at noaa.gov
Thu Nov 12 12:37:37 EST 2009

Lou Pecora wrote:
> Maybe I'm missing something simple, but if your array of 2D points is
> static,

well, not quite.

> a KD tree for 2D nearest neighbor seems like over kill.  You
> might want to try the simple approach of using boxes of points to
> narrow things down by sorting on the first component.

yeah, we'll probably do something like that if we have to write the code 
ourselves. At the moment, we're using geohash:


(this is for points on the earth)

and it's working OK. I was just hoping kdtree would work out of the box!

 > where for a
> static data set it can match KD trees in speed

Why does it have to be static -- it doesn't look hard to insert/remove 


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the NumPy-Discussion mailing list