mosaic_input | R Documentation |
Create and Export mosaics
mosaic_input(mosaic, ...)
mosaic_export(mosaic, filename, overwrite = FALSE, ...)
mosaic |
|
... |
Additional arguments passed to |
filename |
character. The Output filename. |
overwrite |
logical. If |
mosaic_input()
is a simply wrapper around terra::rast()
. It creates a
SpatRaster
object from scratch, from a filename, or from another object.
mosaic_export()
is a simply wrapper around terra::writeRaster()
. It write
a SpatRaster
object to a file.
mosaic_input()
returns an SpatRaster
object.
mosaic_export()
do not return an object.
library(pliman)
# create an SpatRaster object based on a matrix
x <- matrix(1:20, nrow = 4, ncol = 5)
rast <- mosaic_input(x)
mosaic_view(rast, viewer = "base", axes = TRUE)
# create a temporary filename for the example
f <- file.path(tempdir(), "test.tif")
mosaic_export(rast, f, overwrite=TRUE)
list.files(tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.