varMSAVI2 | R Documentation |
varMSAVI2
computes the modified soil-adjusted vegetation index 2
(MSAVI2) from the near-infrared (NIR) and red bands.
varMSAVI2(red, nir)
red |
a |
nir |
a |
The modified soil adjusted vegetation index 2 (MSAVI2) is a vegetation
indicator that removes the effect from background variations
\insertCiteqi1994modifiedRGISTools. This function is used within
ls7FolderToVar
, ls8FolderToVar
,
modFolderToVar
and senFolderToVar
.
A MSAVI2 image in raster
format.
qi1994modifiedRGISTools
# path to the cropped and cutted MODIS images for the region of Navarre wdir <- system.file("ExNavarreVar", package = "RGISTools") # list all the tif files files.mod <- list.files(wdir, pattern="\\.tif$", recursive = TRUE, full.names = TRUE) # print the MOD09 bands getRGISToolsOpt("MOD09BANDS") # select the red and NIR bands img.mod.red <- raster(files.mod[1]) img.mod.nir <- raster(files.mod[2]) # calculate the MSAVI2 image img.mod.msavi2 <- varMSAVI2(img.mod.red, img.mod.nir) # plot the image spplot(img.mod.msavi2,col.regions=rev(topo.colors(20)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.