uxarray.Grid.get_ball_tree#
- Grid.get_ball_tree(coordinates='nodes', coordinate_system='spherical', distance_metric='haversine', reconstruct=False)#
Get the BallTree data structure of this Grid that allows for nearest neighbor queries (k nearest or within some radius) on either the nodes (
node_lon
,node_lat
) or face centers (face_lon
,face_lat
).- Parameters:
coordinates (str, default="nodes") – Selects which tree to query, with “nodes” selecting the Corner Nodes and “face centers” selecting the Face Centers of each face
coordinate_system (str, default="cartesian") – Selects which coordinate type to use to create the tree, “cartesian” selecting cartesian coordinates, and “spherical” selecting spherical coordinates.
distance_metric (str, default="haversine") – Distance metric used to construct the BallTree
reconstruct (bool, default=False) – If true, reconstructs the tree
- Returns:
self._ball_tree – BallTree instance
- Return type:
grid.Neighbors.BallTree