This exercise to create a Canopy Height Model first calls for the DTM and DSM files to be retrieved and plotted:
Now that we have gathered both rasters, the CHM calculation is simple in r:
lidar_chm <- lidar_dsm - lidar_dem
The resulting plot looks like this: Breaks can be created to improve the visualization.
And finally, a histogram of the data, eliminating the outliers to get a better idea of the distribution of values.
We can reclassify the raster into short, medium, and tall trees. It’s interesting to see how much more visible human habitation is in this plot, just based on tree height values.