pyinterp.RTree#
- class pyinterp.RTree(system: Spheroid | None = None, dtype: dtype | None = None, ecef: bool = False)[source]#
Bases:
objectR*Tree spatial index for geodetic scalar values.
- Parameters:
system – WGS of the coordinate system used to transform equatorial spherical positions (longitudes, latitudes, altitude) into ECEF coordinates. If not set the geodetic system used is WGS-84. Default to
None.dtype – Data type of the instance to create.
ecef – If true, the coordinates are provided in the ECEF system, otherwise the coordinates are provided in the geodetic system. Default to
False.
- Raises:
ValueError – if the data type is not handled by the object, or if the a geodetic system is provided and the coordinates system is ECEF (ecef keyword is set to True).
Public Methods
bounds()Get the bounding box containing all stored values.
clear()Remove all values stored in the container.
insert(coordinates, values)Insert new data into the search tree.
inverse_distance_weighting(coordinates[, ...])Interpolate values using inverse distance weighting method.
kriging(coordinates, *[, radius, k, ...])Interpolate the values of a point using kriging.
packing()Create the tree using packing algorithm.
query(coordinates[, k, within, num_threads])Search for the nearest K nearest neighbors of a given point.
radial_basis_function(coordinates[, radius, ...])Interpolate values using radial basis function interpolation.
universal_kriging(coordinates[, radius, k, ...])Interpolate the values of a point using universal kriging.
value(coordinates[, radius, k, within, ...])Get the coordinates and values for the K-nearest neighbors.
window_function(coordinates[, radius, k, ...])Interpolate values using a window function.
Special Methods
__bool__()Check if the tree is not empty.
Get the state of the object for pickling.
__len__()Get the number of values stored in the tree.
__setstate__(state)Set the state of the object from pickling.