В python вы можете использовать kdtree, попробуйте этот фрагмент кода:
сначала вам нужно будет установить pysal
import pysal
from pysal.cg.kdtree import KDTree
locations = [(40.702566, -73.816859),
(40.70546, -73.810708),
(40.709179, -73.820574),
(40.700486, -73.807969),
(40.694624, -73.820593),
(40.695132, -73.820841),
(40.694095, -73.821334),
(40.694165, -73.822368),
(40.695077, -73.822817),
(40.6747769261, -73.8092618174)]
tree = KDTree(locations, distance_metric='Arc', radius=pysal.cg.RADIUS_EARTH_MILES)
current_point = (40.709523, -73.802472)
# get all points within 1 mile of 'current_point'
indices = tree.query_ball_point(current_point, 1)
for i in indices:
print(locations[i])