Vegetation Indices
1. Create a folder called NDVI. On DIA 322 computers, you might want to create this folder in your user Documents folder (e.g. C:\Users\jdoe\Documents\ NDVI). On the DIA 222 computers, you might want to create this folder on the D: drive under D:\course number\user name\ (e.g. D:\ES212\jdoe\ NDVI).
- Download the data then uncompress the file's contents to your NDVI folder.
In this exercise, you will use ArcGIS’ Image Analysis toolto compute Normalized Difference Vegetation Index (NDVI) values for the HowlandForest area (located in Maine) using MODIS(Moderate-Resolution Imaging Spectroradiometer) satellite data. You will thenuse Spatial Analyst to compute zonal statistics for an area of interest.
NDVI is a vegetation index that is associated with vegetation density. It isoften used to distinguish vegetation from non-vegetation features. Itnormalizes the difference between the green leaf scattering in thenear-infrared to the chlorophyll absorption. The NDVI is computed as follows:
where RNIR is the reflectance in the near infrared part of thespectrum, and Rredis reflectance in the red part of the spectrum. The value of the index rangesfrom -1 to 1. A common range for green vegetation is 0.2 to 0.8.
Step 1: Open the map document
Step 2: Calculating an NDVI value for the month of January
Step 3: Compute NDVI values for the other 11 months
Step 4: Averaging NDVI values within an area defined by a polygon
Step 5: Graphing the NDVI values
Navigate to your NDVI project folder and openthe NDVI.mxd map document.
| The yellow circle encompasses an area of the Maine Howland forest that is part of the AmeriFlux network. An instrumented tower is located at the center of the circle The tower provides continuous observations of ecosystem level exchanges of CO2, water, energy and momentum spanning various time scales. The Howland forest main tower site is managed by the USDA Forest Service, the Woods Hole Research Station, the University of Maine, the University of Georgia and the University of California. The forest surrounding the tower is composed of red spruce, eastern hemlock, other conifers such as balsam fir, white pine, northern white cedar, and hardwoods such as red maple and paper birch. A breakdown of each species follows: · 41% red spruce (Picea rubens Sarg.), · 25% eastern hemlock (Tsuga canadensis (L.) Carr.), · 23% other conifers (primarily balsam fir, Abies balsamea (L.) Mill., white pine, Pinus strobus L., and northern white cedar, Thuja occidentalis L.) and, · 11% hardwoods |
Turn off the Howland_naip layer and turn on the Jan09 2008 group layer.
All 12 MODIS group layers in your map document are in araster data format, yet they don’t seem to follow an orthogonal grid of cellsthat you might be accustomed to seeing. This is because the MODIS data wereprovided to us in a Sinusoidalprojection which distorts shape in our area of interest. One could reprojectthe raster to a coordinate system better suited for the state of Maine however,in doing so, we risk ‘contaminating’ the original radiometric signal. This isbecause of the use of interpolation techniques that are needed to transform theraster from one coordinate system to another. We will therefore notreproject the MODIS rasters in this exercise.
A MODIS image is composed of different 'bands'. Each bandhas bits of information such as reflectance value for a particular bandwidthand solar zenith angle at the time of the image acquisition. The followingtable lists the bands and their description.
Band number | Description | UNITS | MULTIPLY BY SCALE FACTOR |
1 | 500m Surface Reflectance Band 1 | Reflectance | 0.0001 |
2 | 500m Surface Reflectance Band 2 | Reflectance | 0.0001 |
3 | 500m Surface Reflectance Band 3 | Reflectance | 0.0001 |
4 | 500m Surface Reflectance Band 4 | Reflectance | 0.0001 |
5 | 500m Surface Reflectance Band 5 | Reflectance | 0.0001 |
6 | 500m Surface Reflectance Band 6 | Reflectance | 0.0001 |
7 | 500m Surface Reflectance Band 7 | Reflectance | 0.0001 |
8 | 500m Reflectance Band Quality | Bit Field | na |
9 | Solar Zenith Angle | Degree | 0.01 |
10 | View Zenith Angle | Degree | 0.01 |
11 | Relative Azimuth Angle | Degree | 0.01 |
12 | 500m State Flags | Bit field | na |
13 | Day of Year | Julian day | na |
Only bands 1 and 2 (representing the red andnear-infrared parts of the spectrum) are present in this map project for eachmonth of the year 2008. The bands are grouped by month.
In this exercise you will use bands 1 and 2 to compute theNDVI values for each pixel in the MODIS rasters.
To calculate the NDVI value,you will need to activate the Spatial Analyst extension.
From theCustomizepull-down menuselectExtensions.
Turn on theSpatial Analystextensionby checking the box next to the extension.
ClickCloseto close the Extensionswindow.
If not already opened, open the Toolbox by clickingon theToolboxbutton.
In ArcToolbox, expand SpatialAnalyst Tools >> Map Algebra.
Double-click on the RasterCalculator tool.
In the RasterCalculator window, click on the open parenthesis symbol.
This action will add theparenthesis symbol to the expression window.
Next, double-clickon .
This will add Band 2from the Jan 09 data set to the expression window.
Next, Click(single click) on the minus operator to add it to the expression window.
Next, double-clickon .
Next, click onthe close parenthesis symbol .
At this point, you havedefined the numerator for the NDVIformula.
On your own, completethe expression by adding the denominator component of the NDVI formula (don’t forget to add the ‘divide by’operator).
When done, your expressionbox should look like this:
There is yet one moreaddition to the expression that will be needed to compute the NDVI: the Floatfunction. All MODIS layers are of integer type. This means that the output of analgebraic expression will also be an integer even if a fraction is present inthe expression. For example, the fraction 245/340 will result in an outputvalue of 0 (value is rounded down). If a float output is desired, adding theFloat function to the numerator or denominator will be required such as Float(245)/340.
In the expression box,add the Float function in front of the first parenthesis by typing ‘Float’.
The expression now looks likethis:
Float("Jan 092008\MYD_SS.MYD09A1.A2008009 - Band_2" - "Jan 092008\MYD_SS.MYD09A1.A2008009 - Band_1") /
("Jan 09 2008\MYD_SS.MYD09A1.A2008009 - Band_2" + "Jan 092008\MYD_SS.MYD09A1.A2008009 - Band_1")
Finally, set theoutput path and raster name to …\NDVI\Jan_NDVI.img (you mightwant to click on the folder icon to set the directory path and define thefilename—don’t forget to add the .img extension).
Click OK to runthe geoprocess.
When the geoprocess iscomplete, a new raster layer will be added to the TOC.
The output image representsNDVI values for each pixel. The greater the value (i.e. the closer the value isto 1), the ‘greener’ the biomass within the pixel.
So far, you have onlycomputed an NDVI raster for the month of January.
On your own, repeat theprocedure outlined in step 2 to create NDVI rasters for the remaining 11months. Name the output rasters Feb.NDVI.img, Mar_NDVI.img, etc…
When complete, you should see12 NDVI rasters in your TOC.
You are interested in findingthe average NDVI value surrounding an instrumented tower in the Howland forest.The area encompassing the tower is represented by the data layer AOI .
One way to average the NDVIvalues within an area of interest is to use theIdentifytoolto read each pixel's NDVI value then compute the average. This may be a timeconsuming process, especially if you need to perform this task for all 12 NDVIdata layers.Fortunately,ArcGIS provides us with a tool that computes an average value for all pixelsfalling within an area of interest.
In the ArcToolbox menutree, navigate toSpatialAnalyst Tools >> Zonaland selectZonal Statistics as Table.
In the ZonalStatistics as Table window selectAOIas the 'Input raster or feature zone data' value,Idas thezone field,Jan_NDVIas theinput value raster and …\NDVI\Jan.dbfasthe output table (don’t forget to add the .dbf extension).
Set the Statisticstype to MEAN.
Click OK to runthe geoprocess.
The newly created Jantable will be added to your TOC.
Right-click on Jan andselect Open.
This brings up the attributetable.
The mean NDVI value for themonth of January within the AOI extent is 0.53.
Compute the ZonalStatistics for the remaining 11 months. Name the outputs Feb.dbf, Mar.dbf,etc…
When complete, you should see12 NDVI tables in your TOC.
Next, you will combine thetables into a single table.
From the Geoprocessingpull-down menu, select Merge.
In the Mergewindow, add all twelve tables. Make sure that the tables appear inchronological order!
Save the output table inthe NDVI folder and name it all_NDVI.dbf (don’t forget to specify the.dbf extension)
Click OK to runthe geoprocess.
The new all_NDVI tablewill be added to the TOC.
In the last and final step,you will graph the results.
From the Viewpull-down menu, go to Graphs and select Create Graph.
In the Create GraphWizard window, select Vertical Line as graph type.
Select all_NDVIas the table.
Select MEAN forthe Y field.
Click Next.
Click Finish.
The output orderfollows the month order in the all_NDVI table (which explains why their orderin the Merge function was critical).
Note the peak NDVI values inSummer--as expected. You will also note that the NDVI values for the wintermonths are not low. This is because most trees in the AOI are evergreens(hence, they remain green year round).
Save your Map document.
Close your map document
This concludes this session.
Manuel Gimond, last modified on 3/2/2012