pyinterp.RTree¶
- class pyinterp.RTree(system: Spheroid | None = None, dtype: dtype | None = None, ecef: bool = False)[source]¶
Bases:
object
R*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
()Returns the box able to contain all values stored in the container.
clear
()Removes all values stored in the container.
insert
(coordinates, values)Insert new data into the search tree.
inverse_distance_weighting
(coordinates[, ...])Interpolation of the value at the requested position by inverse distance weighting method.
packing
(coordinates, values)The tree is created using packing algorithm (The old data is erased before construction.)
query
(coordinates[, k, within, num_threads])Search for the nearest K nearest neighbors of a given point.
radial_basis_function
(coordinates[, radius, ...])Interpolation of the value at the requested position by 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 of a given point.
window_function
(coordinates[, radius, k, ...])Interpolation of the value at the requested position by window function.
Special Methods
__bool__
()Returns true if the tree is not empty.
Return the state of the object for pickling purposes.
__len__
()Returns the number of values stored in the tree.
__setstate__
(state)Set the state of the object from pickling.