View source: R/interpolateRaster.R
smoothRaster | R Documentation |
Uses thin plate spline regression from
fields
package to smooth raster values.
smoothRaster(inputRaster, fast = FALSE, ...)
inputRaster |
An object of class |
fast |
A logical operator. Setting to |
... |
For any additional arguments passed to |
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.
An object of class SpatRaster
Tps
, fastTps
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.