pyinterp.rtree.kriging#
- pyinterp.rtree.kriging(tree, coordinates, config=None, *, k=None, covariance_model=None, sigma=None, lambda_=None, nugget=None, drift_function=None, radius=None, boundary_check=None, num_threads=None)[source]#
Kriging interpolation.
- Parameters:
tree (core.RTree3DHolder | core.geometry.geographic.RTree) – R*Tree containing the scattered data.
coordinates (np.ndarray[TwoDims, np.dtype]) –
Query coordinates as a NumPy array with shape:
(N, 2): For geographic.RTree, representing (longitude, latitude).
(N, 2) or (N, 3): For RTree3DHolder, representing (longitude, latitude[, altitude]).
config (rtree.Kriging | None) – Configuration object (if provided, keyword args are ignored)
k (int | None) – Number of nearest neighbors to use
covariance_model (CovarianceFunction | None) – Covariance function type
sigma (float | None) – Variance parameter
lambda – Length scale parameter
nugget (float | None) – Nugget effect
drift_function (DriftFunction | None) – Drift/trend function
radius (float | None) – Search radius (None = no limit)
boundary_check (BoundaryCheck | None) – Boundary checking mode
num_threads (int | None) – Number of threads (0 = auto)
- Returns:
Tuple of (interpolated values, neighbor counts)
- Return type:
tuple[np.ndarray[OneDim, np.dtype], NDArray1DUInt32]
Examples
>>> result, counts = kriging( ... tree, coords, k=10, covariance_model="matern_32" ... )