[SciPy-user] Efficiently searching the surface of a sphere

Zane Selvans zane@ideotrope....
Thu Jun 11 16:48:20 CDT 2009

Zane Selvans <zane <at> ideotrope.org> writes:

> It's unclear to me at the moment whether I can use the kd-tree data
> structure for this:
> http://docs.scipy.org/doc/scipy/reference/spatial.html
> and somehow define the "distance" metric to be the spherical distance...

Hmm.  Maybe on second thought, the right thing to do is just convert all the
points in question to 3D cartesian coordinates at the beginning, and use the
kd-tree as it is.  The distances involved will change, but the nearest-neighbors
should still be the same points.

More information about the SciPy-user mailing list