NDWI
Enhances water using Green and NIR.
Extract a land–water boundary from optical imagery using a water index, thresholding, mask cleanup, and optional edge refinement.
Remote Sensing CoreEnd-User DocumentationTheory + Formula + ParametersExtract a land–water boundary from optical imagery using a water index, thresholding, mask cleanup, and optional edge refinement.
Enhances water using Green and NIR.
Uses SWIR instead of NIR and can suppress built-up/soil responses in many settings.
Automatically selects a split that maximizes between-class variance.
Uses an analyst-defined threshold.
Uses image gradients to support a sharper boundary near the threshold-derived water mask.
| Input | Type | Requirement | Description |
|---|---|---|---|
| Input Raster | raster | Required | Multispectral raster used to separate water and land. |
| Parameter | Default | Choices / Range | How to Use It |
|---|---|---|---|
| Water Index Method | mndwi | MNDWI — Green & SWIR, NDWI — Green & NIR | |
| Green Band | — | — | |
| NIR Band | — | — | Shown for: ndwi |
| SWIR Band | — | — | Shown for: mndwi |
| Water Threshold | otsu | Auto — Otsu, Manual | |
| Manual Index Threshold | 0.0 | -1.0 to 1.0 | Shown for: manual |
| Water Is | greater | Index >= threshold, Index <= threshold | NDWI/MNDWI usually classify water on the greater-than side, but the option is exposed for unusual sensors or preprocessing. |
| Minimum Water Area (pixels) | 100 | 0 to 10000000 | |
| Maximum Water Hole Area (pixels) | 100 | 0 to 10000000 | Fill small holes inside water regions before shoreline extraction. |
| Boundary Refinement | none | Water Mask Boundary — recommended, Canny Edge Assisted, Sobel Edge Assisted | The shoreline always follows the water-mask boundary. Edge-assisted modes snap boundary pixels toward strong image-index edges. |
| Edge Gaussian Sigma | 1.0 | 0.0 to 10.0 | Shown for: canny, sobel |
| Edge Snap Distance (pixels) | 2 | 1 to 20 | Shown for: canny, sobel |
| Minimum Shoreline Length (pixels) | 10.0 | 0.0 to 1000000.0 | |
| Simplify Tolerance (pixels) | 0.5 | 0.0 to 100.0 |
The result should be interpreted according to the selected method and the physical meaning of the input data. Preserve source units, coordinate reference information, NoData meaning, acquisition date, and preprocessing level when comparing results.