| geo_indices | R Documentation |
Computes a collection of spectral indices from a multispectral terra::SpatRaster
or raster file path and returns the results stacked into a multi-layer SpatRaster.
geo_indices(
image,
indices,
bands = NULL,
scale_factor = NULL,
sensor = NULL,
...
)
image |
A |
indices |
Character vector of index codes to compute (e.g.,
|
bands |
Optional named vector or list specifying custom band mapping. |
scale_factor |
Optional numeric scaling divisor (e.g. |
sensor |
Optional character string specifying a sensor preset. |
... |
Additional parameters passed to index calculation functions. |
A multi-layer terra::SpatRaster where each layer corresponds to
one computed index, named accordingly.
img <- get_example_data()
# Compute NDVI, NDWI and MNDWI simultaneously
stack <- geo_indices(img, c("NDVI", "NDWI", "MNDWI"))
print(stack)
names(stack)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.