The Normalized Difference Water Index (NDWI) proposed by McFeeters (1996) is designed to delineate open water features and enhance their presence in remotely-sensed digital imagery. It uses reflected near-infrared radiation and visible green light to enhance water features while eliminating soil and terrestrial vegetation features.

Used in water detection.

When to use

  • Permanent and seasonal water body delineation
  • Flood mapping and emergency response
  • Wetland inventory and change detection
  • Reservoir and lake water level monitoring
  • Coastal shoreline change analysis
  • open water feature detection
  • water body mapping

Limitations

  • Dark surfaces (shadows, asphalt, dark soils) can produce false positives
  • Suspended sediments and algae alter spectral response in shallow water
  • Mixed pixels at water boundaries reduce edge accuracy
  • Atmospheric correction quality directly impacts threshold selection
  • Sun glint over open water can saturate sensors and bias values

What the values mean

-1 Definitely not water
-0.3 Dry / built-up surface
0 Possible moisture / wet soil
0.3 Open water
0.6 Deep / clear water
Surface typeTypical NDWI
Built-up, asphalt-0.5 to -0.2
Bare soil, vegetation-0.2 to 0
Wet soil, flooded fields0 to 0.3
Open water, lakes0.3 to 0.7

General Formula

Green 560
NIR 830

Sensor-Specific Formulas

Most-used sensors — click to show code below

SensorProviderFormulaBand Mapping
21AT(Green - NIR) / (Green + NIR)Green→Green, NIR→NIR
CG Satellite(Green - NIR) / (Green + NIR)Green→Green, NIR→NIR
USDA(Green - NIR) / (Green + NIR)Green→Green, NIR→NIR
ESA(B3 - B8) / (B3 + B8)Green→B3, NIR→B8
MAXAR(Green - NIR1) / (Green + NIR1)Green→Green, NIR→NIR1
MAXAR(Green - NIR1) / (Green + NIR1)Green→Green, NIR→NIR1

Spectral Band Visualization — BJ3A

Code Examples

Adapted for BJ3A bands —

ndwi_mcfeeters_bj3a.py

Frequently Asked Questions

What is the NDWI (Normalized Difference Water Index (McFeeters)) and when should I use it?

The Normalized Difference Water Index (NDWI) proposed by McFeeters (1996) is designed to delineate open water features and enhance their presence in remotely-sensed digital imagery. It uses reflected near-infrared radiation and visible green light to enhance water features while eliminating soil and terrestrial vegetation features. Water indices exploit the strong absorption of shortwave infrared and near-infrared radiation by liquid water. They are critical for delineating water bodies, assessing moisture stress in vegetation, and monitoring hydrological changes over time. NDWI is particularly suited for open water feature detection, water body mapping, water content monitoring. The general formula is (Green - NIR) / (Green + NIR), which requires Green and NIR spectral bands.

Which satellite sensors can I use to calculate NDWI?

NDWI is supported by 21 satellite sensors in our database, including BJ3A, BJ3N, Dragonette-2/3, Gaofen-1, Gaofen-2 and 16 more. Each sensor uses different band designations — for example, BJ3A uses the formula (Green - NIR) / (Green + NIR), while BJ3N uses (Green - NIR) / (Green + NIR). Select a sensor above to see its specific band mapping.

What spectral bands does NDWI require and why?

NDWI requires Green (560), NIR (830). Water absorbs strongly in the near-infrared and shortwave infrared portions of the spectrum, creating a measurable contrast with shorter wavelengths that penetrate the water surface.

How do I calculate NDWI in Python or R?

Both Python and R code samples are provided above. In Python, use rasterio to load individual band GeoTIFF files and numpy for the arithmetic. In R, the terra package handles raster operations efficiently. The key is to load bands as floating-point arrays to avoid integer division, and to handle division-by-zero cases where the denominator equals zero. For production use, consider applying a valid data mask to exclude no-data pixels before calculation.

Can NDWI distinguish water from other dark surfaces?

NDWI is designed to enhance water features, but dark surfaces like shadows, asphalt, and dark soils can produce similar values. For reliable water mapping, consider combining NDWI with a threshold analysis and, where possible, a secondary index to reduce false positives. Time-series analysis can also help distinguish permanent water bodies from temporary dark surfaces.

NDWI vs other water indices

IndexNameHow it differs
LSWILand Surface Water IndexAlternative water index — different band combination
LWVI-1Leaf Water Vegetation Index 1Alternative water index — different band combination
LWVI-2Leaf Water Vegetation Index 2Alternative water index — different band combination
MNDWIModified Normalized Difference Water IndexUses SWIR instead of NIR — much better at distinguishing water from built-up areas

Related Water Indices

References

McFeeters, S.K. (1996) - The use of the Normalized Difference Water Index (NDWI) in the delineation of open water features. International Journal of Remote Sensing, 17(7), 1425-1432

Need help choosing?

Ask our AI assistant for sensor recommendations, code examples, or how NDWI compares to other indices for your specific use case.

Ask AI →