uxarray.grid.neighbors.BallTree.query_radius#
- BallTree.query_radius(coords, r=1.0, in_radians=False, return_distance=False, count_only=False, sort_results=False)#
Queries the tree for all neighbors within a radius
r
.- Parameters:
coords (array_like) – coordinate pairs in degrees (lon, lat) to query
r (distance in degrees within which neighbors are returned) – r is a single value for the radius of which to query
in_radians (bool, optional) – if True, queries assuming coords are inputted in radians, not degrees. Only applies to spherical coordinates
return_distance (bool, default=False) – Indicates whether distances should be returned
count_only (bool, default=False) – Indicates whether only counts should be returned
sort_results (bool, default=False) – Indicates whether distances should be sorted
- Returns:
d (ndarray of shape (coords.shape[0], k), dtype=double) – Distance array that keeps the distances of all neighbors within some radius to the entries from coords in each row
ind (ndarray of shape (coords.shape[0], k), dtype=INT_DTYPE) – Index array that keeps the indices of all neighbors within some radius to the entries from coords in each row