Skip to main content

preprocessing.compute_ndwi

preprocessing.compute_ndwi(green, nir)

NDWI (McFeeters 1996) = (GREEN - NIR) / (GREEN + NIR).

Positive over water, negative over vegetation / bare ground. The standard “is this pixel wet” index for Sentinel-2 / Landsat green + NIR. For shortwave-IR-based water indices (MNDWI) use a SWIR1 band in place of NIR — same formula shape, different signal.