This activity will utilize the skills that you learned in the previous lessons. You will
- Import several rasters into R
- Perform raster math to calculate NDVI (Normalized Difference Vegetation Index)
- Create a color coded plot of NDVI
- Export the NDVI file as a georeferenced tiff.
What you'll need
- R or R studio loaded on your computer
- rgdal, raster, sp libraries installed on you computer.
Data to DownloadDownload the raster and insitu collected vegetation structure data: National Ecological Observatory Network's San Joaquin Experimental Range and Soaproot Saddle field sites. This data is intended for educational purposes, for access to all the data for research purposes visit the NEON Data Portal.
Recommended ReadingAll of hte topics and concepts you need to complete this capstone were covered in the links on this page.
Generating a Raster of NDVI
The Normalized Difference Vegetation Index is calculated using the following equation: (NIR - Red) / (NIR + Red) where:
- NIR is the near infrared band in an image
- Red is the red band in an image.
Use the Red (Band 58 in the tiff files) and the NIR (band 90 in the tiff files) tiff files to
- Calculate NDVI in R.
- Plot NDVI. Make sure your plot has a title and a legend. Assign a colormap to the plot and specify the breaks for the colors to represent NDVI values that make sense to you. For instance, you might chose to color the data using breaks at .25,.5, .75 and 1.
- Expore your final NDVI dataset as a geotiff. Make sure the CRS is correct.
- To test your work, bring it into QGIS. Does it line up with the other tiffs (for example the band 19 tiff). Did it import properly?