[SciPy-user] Current status of spatial data structures

Willi Richert w.richert@gmx....
Wed Jan 7 02:15:04 CST 2009


Hi,

here are some observations regarding the current status of kdtree support in 
Python:

- scipy 0.7 includes scipy.spatial and supports spatial searches via KDTree 
http://docs.scipy.org/doc/scipy/reference/spatial.html

- the cookbook contains another kdtree version: 
http://scipy.org/Cookbook/KDTree

- I have provided Python swig wrappers to the libkdtree++ library 
(http://libkdtree.alioth.debian.org/). Although the data structure has to be 
fixed (at compile time of libkdtree++) and thus one has to change the swig 
bindings if one needs to store a different type of vector, it is by my 
knowledge the only implementation that allows changes to the kdtree data 
structure at runtime (add/remove support after initial setup). All the other 
approaches are "create once/query multiple times" approaches.

Maybe this is of interest to somebody on this list. The authors of libkdtree++ 
work towards a dynamic data structure support. If that is accomplished and I 
have adjusted the Python wrapper, will there be room for another kdtree 
implementation in scipy.spatial? If yes, I would try to match the interface as 
closely as possible to the current 

Regards,
wr


More information about the SciPy-user mailing list