xrspatial.interpolate.spline#

xrspatial.interpolate.spline(x, y=None, z=None, template=None, smoothing=0.0, name='spline', *, column=None)[source]#

Thin Plate Spline interpolation.

Parameters:
  • x (array-like) – Coordinates and values of scattered input points. Alternatively, pass a GeoDataFrame of Point geometries as the first argument and leave y/z unset; template and column must then be keywords.

  • y (array-like) – Coordinates and values of scattered input points. Alternatively, pass a GeoDataFrame of Point geometries as the first argument and leave y/z unset; template and column must then be keywords.

  • z (array-like) – Coordinates and values of scattered input points. Alternatively, pass a GeoDataFrame of Point geometries as the first argument and leave y/z unset; template and column must then be keywords.

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

  • smoothing (float, default 0.0) – Smoothing parameter. 0 forces exact interpolation through the data points.

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

  • column (str, optional) – When the first argument is a GeoDataFrame, the column whose values are interpolated. Defaults to the first numeric column.

Return type:

xr.DataArray

Raises:

MemoryError – If the worst-case allocation (kernel block K or augmented system A) would exceed 80% of available memory.