Creating agricultural indices (NDVI, NDRE) in QGIS

Band Order

The first step is to recognize that the number of bands as well as the band order of the GeoTIFF depends on the camera that was used. If you have a GeoTIFF from Atlas, the bands will be in wavelength order.

Orthomosaics and reflectance maps generated from Pix4Dmapper are in the original order.

RedEdge (3, M, and MX): has five bands ordered Blue, Green, Red, Red edge, NIR

Altum (all variants): has six bands ordered Blue, Green, Red, Red edge, NIR, LWIR

Dual Camera System: has ten bands ordered Blue-444, Blue, Green-531, Green, Red-650, Red, Red edge-705, Red edge, Red edge-740, NIR. 

For more details, please see this article.

 

Using the QGIS Raster Calculator

This tutorial shows QGIS version 2.14.3-Essen. Your version may differ slightly.

Load your image into the Layers Panel (drag and drop or Layer > Add layer > Add raster layer...)

Open Raster Calculator from the QGIS menu bar: Raster > Raster Calculator... 

The Raster calculator dialog opens. 

  • Specify an "Output layer" and "Output format", as a new image will be created for your index.
  • Paste in one of the formulas we have provided (in the next section of this article) or use the buttons in "Operators" to enter a formula.
  • Press OK when you have entered the formula.

The new image is added to the Layers Panel. Now you can create a color ramp for your index.

Color your index

To add a color map, double-click on the NDVI image in the Layers Panel (or right-click and choose "Properties" from the context menu).

The Layer Properties dialog appears.

  • Make sure you are on the "Style" tab
  • Change the "Render type" to "Singleband pseudocolor"
  • Choose your preferred gradient and press the "Classify" button.

Press "Apply" to preview your color ramp, and press OK to make the changes.

Now that you have learned how to create an index and apply a color ramp in QGIS, here are some formulas for common indices to get you started. 

Various Indices and Their Formulas

Here is a sampling of the indices used in precision agriculture. Some are calculated automatically in Atlas, while others are not. The formulas are given in QGIS raster calculator format for each camera so that you can copy and paste them. Be sure to replace the word, "image", with the actual file name of your image.

NOTE: For the Dual Camera System, your band names will vary


 

NDVI - Normalized Difference Vegetation Index

(NIR−RED)/(NIR + RED)

RedEdge:

("image@5"-"image@3")/("image@5" + "image@3")

 

NDRE - Normalized Difference Red Edge 

(NIR−RE)/(NIR + RE)

RedEdge:

("image@5"-"image@4")/("image@5" + "image@4")

 

GNDVI - Green NDVI

GNDVI has wider dynamic range than NDVI and is, on average, at least five times more sensitive to chlorophyll-concentration. GNDVI is used to sense the concentration of chlorophyll, to measure the rate of photosynthesis, and to monitor plant stress.

(NIR−GREEN)/(NIR + GREEN)

RedEdge:

("image@5"-"image@2")/("image@5" + "image@2")

 

GRVI - Green RVI 

GRVI is used to monitor the photosynthetically active biomass of plant canopies.

NIR/GREEN

RedEdge:

"image@5"/"image@2"
Have more questions? Submit a request