Description Usage Arguments Details Value References Examples
varNDMI
computes the normalized difference moisture index (NDMI) from
the near-infrared (NIR) and shortwave-infrared 1 (SWIR1) bands.
1 | varNDMI(nir, swir1)
|
nir |
a |
swir1 |
a |
The normalized difference moisture index (NDMI) is an index that represents
the water stress levels of the canopy, using the NIR and SWIR
\insertCitegao1995normalizedRGISTools.
This function is used within ls7FolderToVar
,
ls8FolderToVar
, modFolderToVar
and
senFolderToVar
.
A NDMI image in raster
format.
gao1995normalizedRGISTools
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # 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 NIR and SWIR1 bands
img.mod.nir <- raster(files.mod[2])
img.mod.swir1 <- raster(files.mod[6])
# calculate the NDMI image
img.mod.ndmi <- varNDMI(img.mod.nir,img.mod.swir1)
# plot the image
spplot(img.mod.ndmi)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.