uxarray.grid.BallTree.query_radius#

BallTree.query_radius(xy, r=1.0, xy_in_radians=False, return_distance=True, count_only=False, sort_results=False)#

Queries the tree for all neighbors within a radius r.

Parameters
  • xy (array_like) – coordinate pairs in degrees (lon, lat) to query

  • r (distance in degrees within which neighbors are returned) – r can be a single value , or an array of values of shape x.shape[:-1] if different radii are desired for each point.

  • xy_in_radians (bool, optional) – if True, queries assuming xy are inputted in radians, not degrees

  • 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 (xy.shape[0], k), dtype=double) – Distance array that keeps the distances of all neighbors within some radius to the entries from xy in each row

  • ind (ndarray of shape (xy.shape[0], k), dtype=INT_DTYPE) – Index array that keeps the indices of all neighbors within some radius to the entries from xy in each row