Calculating NDVI
The Normalized Differential Vegetation Index is a very popular vegetation index that gives us useful information about the presence or absence of live green vegetation.
Getting ready
NDVI is calculated using a band with red spectral reflectance values, and another one with near-infrared reflectance values. In the sample dataset, you will find two image files named red.tif
and nir.tif
that can be used to compute NDVI. A project named ndvi.qgs
is available, which contains these two layers and a landsat image corresponding to this same area. Open this project.
How to do it…
Open the Processing Toolbox menu and find the algorithm called Vegetation index[slope based]. Double-click on the algorithm item to execute it:
Select the
red.tif
layer in the Red Band field and thenir.tif
layer in the Near Infrared Band field. Click on Run to run the algorithm.The algorithm will produce a set of layers with different vegetation indices, NDVI is among them:
How it works…
All vegetation indices...