Interpolate points within a moving window using inverse distance weighting. The maximum number of points used can be restricted, optionally by selecting the nearest points.
# S4 method for SpatRaster,SpatVector interpIDW(x, y, field, radius, power=2, smooth=0, maxPoints=Inf, minPoints=1, near=FALSE, fill=NA, filename="", ...) # S4 method for SpatRaster,matrix interpIDW(x, y, radius, power=2, smooth=0, maxPoints=Inf, minPoints=1, near=FALSE, fill=NA, filename="", ...)
SpatVector or matrix with three columns (x,y,z)
character. field name in SpatVector
numeric. The radius of the circle (single number). If
near=FALSE, it is also possible to use two or three numbers. Two numbers are interpreted as the radii of an ellipse (x and y-axis). A third number should indicated the desired, counter clockwise, rotation of the ellipse (in degrees)
numeric. Weighting power
numeric. Smoothing parameter
numeric. The minimum number of points to use. If fewer points are found in a search ellipse it is considered empty and the fill value is returned
numeric. The maximum number of points to consider in a search area. Additional points are ignored. If fewer points are found, the fill value is returned
maxPoints is reached, should the nearest points within the neighborhood be used?
numeric. value to use to fill empty cells
character. Output filename
additional arguments for writing files as in