xrspatial.interpolate.kriging#

xrspatial.interpolate.kriging(x, y, z, template, variogram_model='spherical', nlags=15, return_variance=False, name='kriging')[source]#

Ordinary Kriging interpolation.

Parameters:
  • x (array-like) – Coordinates and values of scattered input points.

  • y (array-like) – Coordinates and values of scattered input points.

  • z (array-like) – Coordinates and values of scattered input points.

  • template (xr.DataArray) – 2-D DataArray whose grid defines the output raster.

  • variogram_model (str, default 'spherical') – Variogram model: 'spherical', 'exponential', or 'gaussian'.

  • nlags (int, default 15) – Number of lag bins for the experimental variogram.

  • return_variance (bool, default False) – If True, return (prediction, variance) tuple.

  • name (str, default 'kriging') – Name of the output DataArray.

Returns:

Prediction raster, or (prediction, variance) if return_variance is True.

Return type:

xr.DataArray or tuple of xr.DataArray

Raises:

MemoryError – If the worst-case allocation (variogram pair arrays, kriging matrix, or prediction matrix) would exceed 80% of available memory.