The l2d_chm script provides the last, and quickest step, in creating a Canopy Height Model. Provide the filename pattern of the input DSM and DTM files, and the difference image will be output. The optional hillshade argument will create a hillshade image of the resulting CHM using the gdal_dem program.

If a shapefile is provided, the CHM will be calculated for each shapefile feature using the corresponding DTM and DSM for that feature (and matching the filename pattern given, e.g., feature-0_dsm.max.tif). The pieces will then be merged into a VRT file.

$ l2d_chm -h
usage: l2d_chm [-h] [-s SITE] [--dsm DSM] [--dtm DTM] [--fout FOUT]
               [--hillshade] [-v]
               demdir

Calculate and create CHM from a DSM and DTM

positional arguments:
  demdir                Directory holding DEMs (and used to store CHM output

optional arguments:
  -h, --help            show this help message and exit
  -s SITE, --site SITE  Site shapefile name (use if used for DTM/DSM creation
                        (default: None)
  --dsm DSM             Filename of DSM input (will be preceded by feature
                        name if using shapefile (default: dsm.max.tif)
  --dtm DTM             Filename of DTM input (will be preceded by feature
                        name if using shapefile (default: dtm.idw.tif)
  --fout FOUT           Output filename (created in demdir) (default: chm.tif)
  --hillshade           Generate hillshade (default: False)
  -v, --verbose         Print additional info (default: False)