Learn R Programming

nightmares (version 0.0.2)

MNDWI: MNDWI - Normalized Difference Water Index

Description

MNDWI can enhance open water features while efficiently suppressing and even removing built-up land noise as well as vegetation and soil noise.

Usage

MNDWI(G, SWIR1)

Arguments

G

A raster layer object with the reflectance values for the Green band.

SWIR1

A raster layer object with the reflectance values for the Short Wave Infrared band.

Value

MNDWI - Normalized Difference Water Index

References

Xu, H. 2006. Modification of normalised difference water index (NDWI) to enhance open water features in remotely sensed imagery. International Journal of Remote Sensing, 27(14), 3025-3033.

Examples

Run this code
# 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)
MNDWI(x[[3]], x[[6]])

# }

Run the code above in your browser using DataLab