xoa.geo.get_neighbors

Contents

xoa.geo.get_neighbors#

xoa.geo.get_neighbors(obj, target, k=None, radius=None, units='m', output='index', **kwargs)[source]#

Find the nearest neighbors of target points, or those within a distance

This builds a GeoKDTree for a single query. Build it once instead to make several queries on the same points.

Parameters:
Returns:

See GeoKDTree.query() with k, GeoKDTree.query_radius() otherwise.