If you are mapping water bodies, NDWI (Normalized Difference Water Index) and MNDWI (Modified NDWI) are the two most essential indices.
While NDWI is great for general water detection, it often mistakes buildings for water. MNDWI fixes this by using Shortwave Infrared (SWIR) to suppress noise from built-up areas.
1. The Formulas (Landsat 8)
For Landsat 8 data, use the following bands:
- Green: Band 3
- NIR (Near-Infrared): Band 5
- SWIR 1 (Shortwave Infrared): Band 6
| Index | Formula | Equation for Landsat 8 |
| NDWI | $(Green – NIR) / (Green + NIR)$ | (Band 3 - Band 5) / (Band 3 + Band 5) |
| MNDWI | $(Green – SWIR) / (Green + SWIR)$ | (Band 3 - Band 6) / (Band 3 + Band 6) |
The chart above illustrates why we use these bands: Water reflects Green light but absorbs NIR and SWIR, creating a strong contrast.
2. Quick Steps in QGIS
- Load Data: Import your Landsat 8 Band 3, Band 5, and Band 6 images into QGIS.
- Open Raster Calculator: Go to Raster > Raster Calculator.
- Enter the Formula:
- For NDWI:
( "Band3" - "Band5" ) / ( "Band3" + "Band5" ) - For MNDWI:
( "Band3" - "Band6" ) / ( "Band3" + "Band6" )
- For NDWI:
- Save: Choose your output location (e.g.,
mndwi_output.tif) and click OK.
3. How to Interpret the Results
The values will range from -1 to +1.
- Values > 0: Typically represent Water. (Deep clean water often has higher values).
- Values < 0: Typically represent Non-Water (Vegetation, Soil, Buildings).
Pro Tip: If you see “false water” in urban areas using NDWI, switch to MNDWI. The SWIR band absorbs light from buildings more effectively than the NIR band, removing that urban noise.

Leave a Reply