pyinterp.core.geometry.geographic.RTree.query

Contents

pyinterp.core.geometry.geographic.RTree.query#

RTree.query(self, coordinates: numpy.ndarray[dtype=float64, shape=(*, 2), writable=False], config: pyinterp.core.config.rtree.Query | None = None) tuple[numpy.ndarray[dtype=float64, shape=(*, *), order='F'], numpy.ndarray[dtype=float64, shape=(*, *), order='F']]#

Query k-nearest neighbors for multiple points.

Parameters:
  • coordinates – Matrix of shape (n, 2) with (lon, lat) in degrees.

  • config – Query configuration (k neighbors, radius, boundary check, threads).

Returns:

Tuple of (distances, values) with shape [n_points x k]. Distances are geodesic on the spheroid (meters); values mirror the stored data.