Learning Objectives

Following this assignment students should be able to:

  • import, view properties, and plot a raster
  • perform simple raster math
  • extract points from a raster using a shapefile
  • evaluate a time series of raster


Lecture Notes


  1. -- Canopy Height from Space --

    The National Ecological Observatory Network has invested in high-resolution airborne imaging of their field sites. Elevation models generated from LiDAR can be used to map the topography and vegetation structure at the sites. This data gets really powerful when you can compare ecological processes across sites. Download the elevation models for the Harvard Forest (HARV) and San Joaquin Experimental Range (SJER) and the plot locations for each of these sites. Often, plots within a site are used as representative samples of the larger site and act as reference areas to obtain more detailed information and ensure accuracy of satellite imagery (i.e., ground truth).

    1. Generate a Canopy Height Model for each site (HARV and SJER) using simple raster math, where chm = dsm - dtm.

    2. plot() the chm and hist() of canopy heights for each site on a single panel. The raster package modifies plot() from the basic R graphics package, so use par(mfrow=c(2,2), mar=c(5, 4, 2, 2)) prior to plotting to get the four figures on the same panel and to set margins to make labels visible.

    3. Add the plot_locations to the site images. Use the add=TRUE argument in another plot() immediately proceeding plotting the site image to add the plot points.

      Don’t see the plot_locations on the map??? Compare the crs(chm) to crs(plot_locations). HINT: They should be the same.

    4. Extract the maximum canopy heights for each plot at both sites within 10 meters of the center of the plot.

    [click here for output] [click here for output]
  2. -- Phenology from Space --

    The high-resolution images from Canopy Height from Space can be integrated with satellite imagery that is gathered more frequently. We will use data collected from MODIS. One common ecological process that can be observed from space is phenology (or seasonal patterns) of plants. Multi-band satellite imagery can be processed to provide a vegetation index of greenness called NDVI. NDVI values range from -1.0 to 1.0, where negative values indicate clouds, snow, and water; bare soil returns values from 0.1 to 0.2; and green vegetation returns values greater than 0.3.

    Download HARV_NDVI and SJER_NDVI and place them in a folder with the NEON airborne data. The zip contain folders with a year’s worth of NDVI sampling from MODIS. The files are in order (and named) by date and can be organized implicitly by sampling period for analysis.

    1. Plot the whole-raster mean NDVI (cellStats()) for Harvard Forest and SJER through time using different colors for the two sites.
    2. Plot the mean NDVI of the plot_locations (extract()) for Harvard Forest and SJER through time using different colors for the two sites.
    3. Describe the differences in vegetation structure (chm) from Canopy Height from Space and seasonal phenology (NDVI) that you observe in this analysis in a comment. Also, describe the impact of the different mean calculations on the analysis.

    Optional challenge: Extract sampling_day from the NDVI file_name and include that with your data.frame for graphing.

    [click here for output] [click here for output]