
Interpolate values at points to a GRaster using inverse-distance weighting
Source:R/interpIDW.r
interpIDW.RdThis function interpolates values from a set of points to a raster using inverse distance weighting (IDW).
Arguments
- x
A "points"
GVector.- y
A
GRasterto serve as a template for interpolation: Only points inxthat fall inside the extent of the raster will be used for interpolation. You can increase the extent of aGRasterusingextend().- field
Character, integer, or numeric integer: Name or index of the column in
xwith values to interpolate. IfNULLand ifxis a 3-dimensional "points"GVector, then the interpolation will act on the z-coordinate of each point.- nPoints
Integer or numeric integer: Number of nearest points to use for interpolation. The default is to use all points (
Inf).- power
Numeric value > 0: Power to which to take distance when interpolating. The default value is two, so the value of each point used for interpolation is \(1 / d^2\) where d is distance.
See also
terra::interpIDW(), interpSplines(), fillNAs(), GRASS tool v.surf.idw (se grassHelp("v.surf.idw"))