| calc_ndwi | R Documentation |
Computes McFeeters' Normalized Difference Water Index (NDWI) for delineating open water bodies.
calc_ndwi(green, nir)
green |
Green band ( |
nir |
Near-infrared band ( |
NDWI = \frac{GREEN - NIR}{GREEN + NIR}
Description & Purpose: NDWI maximizes the reflectance of water in the green wavelength while minimizing the low reflectance of water in the NIR wavelength.
Interpretation:
> 0.0: Water surfaces (rivers, lakes, wetlands, reservoirs).
<= 0.0: Non-water surfaces (vegetation, soil, built-up areas).
A terra::SpatRaster (named "NDWI") or numeric vector with index values.
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.
calc_mndwi, calc_awei, geo_index
calc_ndwi(green = 0.6, nir = 0.2)
img <- get_example_data()
ndwi_rast <- calc_ndwi(green = img[["green"]], nir = img[["nir"]])
print(ndwi_rast)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.