libpysal.cg.fast_knn

libpysal.cg.fast_knn(pts, k, return_dist=False)[source]

Computes k nearest neighbors on a sphere.

Parameters
ptspython:list of x,y pairs
kpython:int

Number of points to query

return_distbool

Return distances in the ‘wd’ container object

Returns
wnpython:list

list of neighbors

wdpython:list

list of neighbor distances (optional)