Interpolation#

Note

Each function accepts either raw x, y, z arrays or a GeoDataFrame of Point geometries (column selects the value to interpolate, defaulting to the first numeric column). The same operations are available on the .xrs accessor, where the caller raster supplies the output grid, chunks, and CRS:

dem.xrs.kriging(points_gdf, column="elevation")
dem.xrs.spline(points_gdf, coregister=True)

coregister=True reprojects a GeoDataFrame’s points from their CRS into the caller’s CRS before interpolation.

Inverse Distance Weighting (IDW)#

xrspatial.interpolate.idw(x[, y, z, ...])

Inverse Distance Weighting interpolation.

Kriging#

xrspatial.interpolate.kriging(x[, y, z, ...])

Ordinary Kriging interpolation.

Spline#

xrspatial.interpolate.spline(x[, y, z, ...])

Thin Plate Spline interpolation.