xoak.SklearnGeoBallTreeAdapter#
- class xoak.SklearnGeoBallTreeAdapter(points, options)[source]#
sklearn.neighbors.BallTreeadapter forNDPointIndex, using the ‘haversine’ metric.It can be used for indexing a set of latitude / longitude points.
When building the index, the coordinates must be given in the latitude, longitude order.
Latitude and longitude values must be given in degrees for both index and query points (those values are converted in radians by this adapter).
- __init__(points, options)[source]#
- Parameters:
points (ndarray of shape (n_points, n_coordinates)) – Two-dimensional array of points/samples (rows) and their corresponding coordinate labels (columns) to index.
Methods
__init__(points, options)equals(other)Check equality with another TreeAdapter of the same kind.
query(points)Query points.