libpysal.cg.fast_knn

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

Computes k nearest neighbors on a sphere.

Parameters
ptslist of x,y pairs
kint

Number of points to query

return_distbool

Return distances in the ‘wd’ container object

Returns
wnlist

list of neighbors

wdlist

list of neighbor distances (optional)