mosaic_input | R Documentation |
Create and Export mosaics
mosaic_input(
mosaic,
mosaic_pattern = NULL,
info = TRUE,
check_16bits = FALSE,
check_datatype = FALSE,
...
)
mosaic_export(mosaic, filename, datatype = NULL, overwrite = FALSE, ...)
mosaic |
|
info |
Print the mosaic informations (eg., CRS, extend). Defaults to |
check_16bits |
Checks if mosaic has maximum value in the 16-bits format
(65535), and replaces it by NA. Defaults to |
check_datatype |
Logical. If |
... |
Additional arguments passed to |
filename |
character. The Output filename. |
datatype |
The datatype. By default, the function will try to guess the
data type that saves more memory usage and file size. See
|
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 <- system.file("ex/logo.tif", package="terra")
rast <- mosaic_input(x)
mosaic_plot(rast)
# 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.