Cropping NEON Data (NEON)
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.
Check to see if there is a data
directory in your workspace with an SJER
subdirectory in it.
If not, Download the data and extract it into your working directory.
The SJER
directory contains csv data on plot locations (sjer_plots.csv
), raster data for a digital terrain model (SJER_dtmFull.tif
) and a digital surface model (SJER_dsmFull.tif
), and vector data on the site boundary (sjer_boundary.shp
) for the San Joaquin Experimental Range.
- Load the csv plots data (
sjer_plots.csv
) as ansf
object and display that object (don’t load the shape files, use the csv file). The data is in latitudes and longitudes, so the CRS code is 4326. - Reproject the plots data to the UTM coordinates of the DTM data (
SJER_dtmFull.tif
) and display the resulting object. - Crop the DTM data to the site boundary (
sjer_boundary.shp
). To do this, first reproject the site boundary to have the same CRS as the DTM. Make a map showing the site boundary and the cropped DTM data without null values. Use the viridis color ramp. - Use a bounding box to crop both the DTM data and the plots data. The bounding box should have
xmin = 256500
,xmax = 257500
,ymin = 4110000
, andymax = 4111000
. Make a map showing the cropped DTM (with no null values and the viridis color ramp) and the cropped points. Display the plot in the UTM coordinates. - Save the map from (4) as an image named
sjer_cropped_figure.png
. - Write the cropped DTM from (4) to a geotiff file. Name it
sjer_dtm_cropped.tif
. Write the cropped plots data from (4) to a shape file. Name itsjer_plots_cropped.shp
.