Summary
Calculates the Green Normalized Difference Vegetation Index (GNDVI) from a multiband raster object and returns a raster object with the index values.
Discussion
The Green Normalized Difference Vegetation Index (GNDVI) method is a vegetation index for estimating photo synthetic activity and is a commonly used vegetation index to determine water and nitrogen uptake into the plant canopy.
GNDVI = (NIR - Green)/(NIR + Green)
For information about other multiband raster indexes, see the Band Arithmetic raster function.
The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.
Syntax
GNDVI (raster, {nir_band_id}, {green_band_id})
Parameter | Explanation | Data Type |
raster | The input raster. | Raster |
nir_band_id | The band ID of the near-infrared band. The ID index uses one-based indexing. (The default value is 5) | Integer |
green_band_id | The band ID of the green band. The ID index uses one-based indexing. (The default value is 2) | Integer |
Data Type | Explanation |
Raster | The output raster object with the GNDVI index values. |
Code sample
Calculates the Green Normalized Difference Vegetation Index for a Landsat 8 image.
import arcpy
GNDVI_raster = arcpy.sa.GNDVI("Landsat8.tif", 5, 3)