Learn R Programming

ASIP (version 0.4.9)

ndwi: Normalized Difference Water Index

Description

Normalized Difference Water Index (NDWI) is used to monitor changes related to water content in water bodies proposed by McFeeters (1996).

Usage

ndwi(directory = getwd(), crop = "n", ext2crop = "none")

Arguments

ext2crop, crop, directory

Same as mentioned in arvi.

Value

Computed NDWI product

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, 1425-1432. doi:10.1080/01431169608948714.

Gao Bo-cai (1996) NDWI-A normalized difference water index for remote sensing of vegetation liquid water from space. Remote Sensing of Environment, 58 (3), 257-266. doi:10.1016/S0034-4257(96)00067-3.

Examples

Run this code
# NOT RUN {
library (raster)
library (rgdal)
# Finding the path of the sample satellite image directory.
# User may define paths directly like "/home/ur_folder" or "C:/ur_folder"
path <- system.file ("TM_sample", package = "ASIP")
shapefil <- paste0 (path, "/test.shp")
op <- ndwi (directory = path, crop = "y", ext2crop = shapefil)
# }

Run the code above in your browser using DataLab