libpysal.cg.fast_threshold

libpysal.cg.fast_threshold(pts, dist, radius=6371.0)[source]

Find all neighbors on a sphere within a threshold distance

Parameters
pointslistlist of lat-lon tuples (Note, has to be a list, even for one point)
dist: float

threshold distance

radius: float

sphere’s radius

Returns
dict:

key is id of point, value is a list of ids for other points within dist of key point