ndvi: Normalized Difference Vegetation Index

View source: R/spectral.R

ndviR Documentation

Normalized Difference Vegetation Index

Description

NDVI = (NIR - Red) / (NIR + Red) from surface reflectance, e.g. Landsat 8-9 bands 5 and 4, Sentinel-2 bands 8 and 4, or MODIS bands 2 and 1. Works on numeric vectors and on terra::SpatRaster layers.

Usage

ndvi(nir, red)

Arguments

nir

Near-infrared reflectance.

red

Red reflectance.

Value

NDVI in the range -1 to 1, the same shape as the inputs.

References

Tucker, C.J. (1979). Red and photographic infrared linear combinations for monitoring vegetation. Remote Sensing of Environment, 8(2), 127-150. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/0034-4257(79)90013-0")}

See Also

ndbi()

Examples

ndvi(nir = 0.45, red = 0.08)

varunayan documentation built on Oct. 30, 2026, 1:07 a.m.