varNDVI | R Documentation |
varNDVI
computes the normalized difference vegetation index (NDVI)
from the red an near-infrared (NIR) bands.
varNDVI(red, nir)
red |
a |
nir |
a |
The normalized difference vegetation index (NDVI) is the most widely used
index for monitoring vegetation dynamics. The NDVI reflects the vegetation vigour
and it is closely related to the amount of photosynthetically active radiation
absorbed \insertCiterouse1972monitoringRGISTools. This function is used
within ls7FolderToVar
, ls8FolderToVar
,
modFolderToVar
and senFolderToVar
.
A NDVI image in raster
format.
rouse1972monitoringRGISTools
# 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 NDVI image img.mod.ndvi <- varNDVI(img.mod.red,img.mod.nir) # plot the image spplot(img.mod.ndvi,col.regions=rev(terrain.colors(20)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.