pyinterp.core.RTree3DFloat32

class pyinterp.core.RTree3DFloat32(self, spheroid: pyinterp.core.geodetic.Spheroid | None = None)

Bases: pybind11_object

Create a spatial index for geodetic scalar values.

This class implements an R*-tree spatial index to efficiently query and interpolate values on the sphere. It supports both geodetic (longitude, latitude, altitude) and Cartesian (ECEF) coordinate systems.

Parameters:
  • spheroid – World Geodetic System (WGS) of the coordinate system used to transform geodetic positions (longitude, latitude, altitude) into ECEF coordinates. If not set, WGS-84 is used. Defaults to None.

  • ecef – If True, coordinates managed by this instance are in the Cartesian coordinate system (ECEF) and no conversion from geodetic coordinates is performed. Defaults to False.

Raises:

ValueError – If both spheroid and ecef are specified. Either the spheroid or ecef parameter should be set, but not both.

Public Methods

bounds(self)

Get the bounding box containing all stored values.

clear(self)

Removes all values stored in the container.

insert(self, coordinates, values)

Add new data into the spatial index.

inverse_distance_weighting(self, coordinates)

Interpolate values using inverse distance weighting.

kriging(self, coordinates, numpy.float32], ...)

Interpolate values using kriging.

packing(self, coordinates, values)

Build the spatial index using a packing algorithm.

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

Find the K nearest neighbors of given points.

radial_basis_function(self, coordinates, ...)

Interpolate values using radial basis functions.

value(self, coordinates[, radius, k, ...])

Get the K nearest neighbors of given points.

window_function(self, coordinates, ...)

Interpolate values using a window function.

Special Methods

__bool__(self)

Called to implement truth value testing and the built-in operation bool().

__copy__(self)

Implements the shallow copy operation.

__getstate__(self, /)

__len__(self)

Called to implement the built-in function len()

__setstate__(self, arg0)