View source: R/SOptim_ExtractFeaturesIndices.R
calculateNDIcombinations | R Documentation |
Calculates (all or some) NDI combinations based on an input SpatRaster stack with n>1 layers. Combinations are
obtained using the combn
function (for combinations of n layers, taken 2
at a time).
calculateNDIcombinations(
rst,
bandNames = NULL,
subsetBands = NULL,
getSpatRaster = TRUE,
scale10k = FALSE,
filename = NULL,
writeSingleBandRaster = FALSE,
verbose = TRUE,
...
)
rst |
An input |
bandNames |
A character vector defining band names (e.g., c("Bl","Gr","Rd","NIR")). |
subsetBands |
An integer vector defining which bands to be used. |
getSpatRaster |
Should the function return a final |
scale10k |
Should data be scaled/multiplied by a factor of 10000 (default: FALSE). If TRUE then the raster data type is set to "INT4S" (otherwise "FLT4S" is used). Used to prevent out-of-memory problems. |
filename |
A base filename used to export NDI combinations as a multiband (if writeSingleBandRaster=FALSE) or single-band (if otherwise). |
writeSingleBandRaster |
If an output filename is defined should each NDI raster be written separetely? (default: FALSE) This is used to save up memory by not having to stack up each NDI raster. If writeSingleBandRaster is set to TRUE then a filename must be defined. The final filename will have the band indices or names as suffix. |
verbose |
Should the function print out progress messages? (default: TRUE) |
... |
Additional arguments passed to |
A SpatRaster
object is returned if getSpatRaster=TRUE
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.