mosaic_resample {pliman} | R Documentation |
A wrapper around terra::resample()
Description
Transfers values between SpatRaster objects that do not align (have a
different origin and/or resolution). See terra::resample()
for more details
Usage
mosaic_resample(mosaic, y, ...)
Arguments
mosaic |
SpatRaster to be resampled |
y |
SpatRaster with the geometry that x should be resampled to |
... |
Further arguments passed on to |
Value
SpatRaster
Examples
if (interactive() && requireNamespace("EBImage")) {
library(pliman)
library(terra)
r <- rast(nrows=3, ncols=3, xmin=0, xmax=10, ymin=0, ymax=10)
values(r) <- 1:ncell(r)
s <- rast(nrows=25, ncols=30, xmin=1, xmax=11, ymin=-1, ymax=11)
x <- mosaic_resample(r, s, method="bilinear")
opar <- par(no.readonly =TRUE)
par(mfrow=c(1,2))
plot(r)
plot(x)
par(opar)
}
[Package pliman version 3.0.0 Index]