calc_mndwi: Calculate Modified Normalized Difference Water Index (MNDWI)

View source: R/calc_indices.R

calc_mndwiR Documentation

Calculate Modified Normalized Difference Water Index (MNDWI)

Description

Computes Xu's Modified Normalized Difference Water Index (MNDWI), substituting SWIR1 for NIR to enhance open water features in urban landscapes.

Usage

calc_mndwi(green, swir1)

Arguments

green

Green band (terra::SpatRaster or numeric).

swir1

Short-wave infrared 1 band (terra::SpatRaster or numeric).

Details

MNDWI = \frac{GREEN - SWIR1}{GREEN + SWIR1}

Description & Purpose: Standard NDWI can produce false water detections on built-up and impervious surfaces. MNDWI suppresses built-up noise significantly because urban land has high SWIR reflectance.

Value

A terra::SpatRaster (named "MNDWI") or numeric vector with index values.

References

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

See Also

calc_ndwi, calc_awei, geo_index

Examples

calc_mndwi(green = 0.7, swir1 = 0.1)


GeoIndexR documentation built on Oct. 10, 2026, 5:08 p.m.