Note that we are using the projectRaster() function on the raster object, We can thusĪssign the CRS of our DTM_HARV to our hillshade within the projectRaster()įunction as follows: crs = crs(DTM_HARV). We want the CRS of our hillshade to match the DTM_HARV raster. The syntax is projectRaster(RasterObject, crs = CRSToReprojectTo) the CRS that we want to reproject it to.To use the projectRaster() function, we need to define two things: Thus, we are modifying the data! Keep this Lucky for us, the DTM_hill_HARV has a defined CRS. Keep in mind that reprojection only works when you first have a defined CRSįor the raster object that you want to reproject. We can use the projectRaster() function to reproject a raster into a new CRS. We need to reproject (or change the projection of) DTM_hill_HARV into the UTM CRS. Geographic WGS84 - which is represented by latitude and longitude values.īecause the two rasters are in different CRSs, they don’t line up when plotted GEOGCRS["WGS 84 (with axis order normalized for visualization)",ĭTM_HARV is in the UTM projection, with units of meters. PARAMETER["Scale factor at natural origin",0.9996,ĪREA,ĭeprecated Proj.4 representation: +proj=longlat +datum=WGS84 +no_defs PARAMETER["Longitude of natural origin",-75, PARAMETER["Latitude of natural origin",0, The hillshade layer maps the terrain using light and shadow to create a 3D-looking image,īased on a hypothetical illumination of the ground level.įirst, we need to import the DTM and DTM hillshade data. ( DTM_HARV) draped or layered on top of the hillshade ( DTM_hill_HARV). Here, we will create a map of the Harvard Forest Digital
We’ll be looking at another model (the canopy height model) inĪ later episode and will see how to calculate the CHM from theĭSM and DTM. The digital terrain model (DTM) shows the ground level.
This differs from the surface model data we’ve been working with soįar in that the digital surface model (DSM) includes the tops of trees, while Whatįor this episode, we will be working with the Harvard Forest Digital Terrain In that episode, all of our data were in the same CRS. Raster Projection in RĮpisode, we learned how to layer a raster file on top of a hillshade for a nice Will walk though reprojecting rasters in R using the projectRaster()įunction in the raster package. This episode explains how to deal with rasters in different, known CRSs.
Rasters that don’t line up are most often in different Coordinate Sometimes we encounter raster datasets that do not “line up” when plotted orĪnalyzed. See the lesson homepage for detailed information about the software,ĭata, and other prerequisites you will need to work through the examples in this episode. Things You’ll Need To Complete This Episode