pyinterp.RTree#

class pyinterp.RTree(system: geodetic.Spheroid | None = None, dtype: numpy.dtype | None = None, ndims: int = 3)[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.

  • ndims – The number of dimensions of the tree. This dimension must be at least equal to 3 to store the ECEF coordinates of the points. Default to 3.

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.

__getstate__()

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.