mosaic_to_pliman | R Documentation |
Convert an SpatRaster
object to a Image
object with optional scaling.
mosaic_to_pliman(
mosaic,
r = 3,
g = 2,
b = 1,
re = 4,
nir = 5,
rescale = TRUE,
coef = 0
)
mosaic |
A mosaic of class |
r |
The layer for the Red band (default: 3). |
g |
The layer for the Green band (default: 2). |
b |
The layer for the Blue band (default: 1). |
re |
The layer for the Red-edge band (default: 4). |
nir |
The layer for the Near-infrared band(default: 5). |
rescale |
Rescale the final values? If |
coef |
An addition coefficient applied to the resulting object. This is useful to adjust the brightness of the final image. Defaults to 0. |
This function converts SpatRaster
into an Image
object, which
can be used for image analysis in pliman
. Note that if a large
SpatRaster
is loaded, the resulting object may increase considerably the
memory usage.
An Image
object with the same number of layers as mosaic
.
library(pliman)
# Convert a mosaic raster to an Image object
mosaic <- mosaic_input(system.file("ex/elev.tif", package="terra"))
pliman_image <- mosaic_to_pliman(mosaic)
plot(pliman_image)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.