Description Usage Arguments Details Value Note Author(s) References Examples
computes several indices based on RGB+NIR bands
1 2 3 4 5 6 7 8 | vegInd_mspec(
mspec,
red = NULL,
green = NULL,
blue = NULL,
nir = NULL,
indlist = "all"
)
|
mspec |
a RasterStack with RGB+NIR bands |
red |
the band/layer number of band 'red' |
green |
the band/layer number of band 'green' |
blue |
the band/layer number of band 'blue' |
nir |
the band/layer number of band 'Near Infrared (NIR)' |
indlist |
comma-separated character combinations of the desired indices. Select from "NDVI","TDVI","SR","MSR" default=all. See details |
"NDVI" - Normalized Difference Vegetation Index; (nir-red)/(nir+red)
"TDVI" - Transformed Difference Vegetation Index; sqrt(0.5+(nir-red/nir+red))
"SR" - Simple Ratio; red/nir
"MSR" - Modified Simple Ratio; red/((nir/red+1)**0.5)
Returns a RasterStack with the selected indices
notes if needed
Andreas Schönberg
The IDB Project (2020): Index Database (https://www.indexdatabase.de/)
1 2 3 4 5 6 7 8 9 10 11 | ### load data
extpath <-system.file("extdata","lau_mspec.tif",package = "LEGION")
mspec <- raster::stack(extpath)
names(mspec)<- c("blue","green","red","nir")
### compute all vegetation indizes
x <-LEGION::vegInd_mspec(mspec,3,2,1,4)
plot(x)
### select specific vegetation indices
vi <-c("NDVI","TDVI")
y <-LEGION::vegInd_mspec(mspec,3,2,1,4,indlist=vi)
plot(y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.