smoothRaster {voluModel} | R Documentation |
Smooth rasters
Description
Uses thin plate spline regression from
fields
package to smooth raster values.
Usage
smoothRaster(inputRaster, fast = FALSE, ...)
Arguments
inputRaster |
An object of class |
fast |
A logical operator. Setting to |
... |
For any additional arguments passed to |
Details
Original raster is smoothed using a thin
plate spline. This may be desirable in cases where
the user has a reasonable expectation of spatial autocorrelation,
but observes putative measurement errors in a raster. The user has
the option of choosing fastTps
to speed calculation,
but be advised that this is only an approximation
of a true thin plate spline.
Value
An object of class SpatRaster
See Also
Examples
library(terra)
library(fields)
# Create sample raster
r <- rast(ncol=100, nrow=100)
values(r) <- 1:10000
# Introduce a "bubble"
values(r)[720:725] <- 9999
plot(r)
# Smooth bubble with smoothRaster
fastSmooth <- smoothRaster(r, fast = TRUE, aRange = 10.0)
plot(fastSmooth)
[Package voluModel version 0.2.1 Index]