pyinterp.RTree

class pyinterp.RTree(system: Optional[pyinterp.geodetic.System] = None, dtype: Optional[numpy.dtype] = None, ndims: int = 3)[source]

Bases: object

R*Tree spatial index for geodetic scalar values.

__init__(system: Optional[pyinterp.geodetic.System] = None, dtype: Optional[numpy.dtype] = None, ndims: int = 3)[source]

Initialize a new R*Tree.

Parameters
  • system (pyinterp.geodetic.System, optional) – 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 (numpy.dtype, optional) – Data type of the instance to create.

  • ndims (int, optional) – 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.

Methods

RTree.bounds()

Returns the box able to contain all values stored in the container.

RTree.clear()

Removes all values stored in the container.

RTree.insert(coordinates, values)

Insert new data into the search tree.

RTree.inverse_distance_weighting(coordinates)

Interpolation of the value at the requested position by inverse distance weighting method.

RTree.packing(coordinates, values)

The tree is created using packing algorithm (The old data is erased before construction.)

RTree.query(coordinates[, k, within, ...])

Search for the nearest K nearest neighbors of a given point.

RTree.radial_basis_function(coordinates[, ...])

Interpolation of the value at the requested position by radial basis function interpolation.

RTree.window_function(coordinates, radius[, ...])

Interpolation of the value at the requested position by window function.

RTree.__bool__()

Returns true if the tree is not empty.

RTree.__getstate__()

Return the state of the object for pickling purposes.

RTree.__len__()

Returns the number of values stored in the tree.

RTree.__setstate__(state)

Set the state of the object from pickling.