NDMI is used to determine vegetation water content.
NDMI(NIR, SWIR)
A raster layer object with the reflectance values for the Near Infrared band.
A raster layer object with the reflectance values for the Short Wave Infrared band.
NDMI - Normalized Difference Moisture Index.
https://www.usgs.gov/core-science-systems/nli/landsat/landsat-surface-reflectance-derived-spectral-indices. https://www.geo.university/pages/spectral-indices-with-multispectral-satellite-data.
# NOT RUN {
library(raster)
path_files <- system.file("extdata/", package="nightmares")
bands <- stack(list.files(path_files,".tif", full.names=TRUE))
x <- ref_oli(bands, sun.elev= 67.97)
NDMI(x[[5]], x[[6]])
# }
Run the code above in your browser using DataLab