Spatial Data Tutorial Series Capstone Challenges
These capstone challenges utilize the skills that you learned in the previous tutorials in the:
- Primer on Raster Data in R series,
- Introduction to Hyperspectral Remote Sensing Data - in R series, or
- Introduction to the Hierarchical Data Format (HDF5) - Using HDFView & R series.
Things You’ll Need To Complete This Tutorial
You will need the most current version of R and, preferably,
on your computer to complete this tutorial.
Install R Packages
More on Packages in R – Adapted from Software Carpentry.
h3> <a href="https://ndownloader.figshare.com/files/7907590" "> NEON Teaching Data Subset: Field Site Spatial Data
These remote sensing data files provide information on the vegetation at the National Ecological Observatory Network's San Joaquin Experimental Range and Soaproot Saddle field sites. The entire dataset can be accessed by request from the NEON Data Portal.
Capstone One: Calculate NDVI for the SJER field sites
The Normalized Difference Vegetation Index (NDVI) is calculated using the equation:
(NIR - Red) / (NIR + Red)
where NIR is the near infrared band in an image and Red is the red band in an image.
Use the Red (Band 58 in the GeoTIFF files) and the NIR (band 90 in the GeoTIFF files) GeoTIFF 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 into quartiles 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 GeoTIFFs (for example the band 19 tiff). Did it import properly?
Capstone Two: Create an HDF5 file
If you have some of your own data that you'd like to explore for this activity, feel free to do so. Otherwise, use the vegetation structure data that we've provided in the data downloads for this workshop.
- Create a new HDF5 file using the vegetation structure data in
D17_2013_SOAP_vegStr.csv. (Note that previously the working directory was set to SJER. You'll have to change this to easily access the SOAP vegetation data).
- Create two groups within a
- one for the San Joaquin (SJER) field site
- one for the Soaproot Saddle (SOAP) field site.
- Attribute each of the above groups with information about the field sites. HINT: you can explore the NEON field sites page for more information about each site.
- Extract the vegetation structure data for San Joaquin and add it as a dataset to the San Joaquin group. Do the same for the Soaproot Saddle dataset.
- Add the plot centroids data to the SJER group. Include relevant attributes for this dataset including the CRS string and any other metadata with the dataset.
- Open the metadata file for the vegetation structure data. Attribute the
structure dataset as you see fit to make it usable. As you do this, think about
- Is there a better way to provide or store these metadata?
- Is there a way to automate adding the metadata to the H5 file?