l2d_dems utilizes git-style subcommands, one for each type of DEM. The online help will print the available commands if called without a subcommand

$ l2d_dems -h
usage: l2d_dems [-h] {dsm,dtm,density} ...

Create DEM(s) from LiDAR files

positional arguments:
  {dsm,dtm,density}
    dsm              Digital Surface Model (non-ground points)
    dtm              Digital Terrain Model (ground points)
    density          Total point density with optional filters

optional arguments:
  -h, --help         show this help message and exit

Each of the 3 subcommands generates a certain type of DEM output (density, dsm, dtm) and uses a common set of arguments, as indicated calling any of them with -h:

$ l2d_dems dtm -h
usage: l2d_dems dtm [-h] [-r [RADIUS [RADIUS ...]]] [-s SITE] [-v]
                    [--outdir OUTDIR] [--suffix SUFFIX] [-g] [-o]
                    [--maxsd MAXSD] [--maxangle MAXANGLE] [--maxz MAXZ]
                    [--returnnum RETURNNUM] [--decimation DECIMATION]
                    lasdir

optional arguments:
  -h, --help            show this help message and exit

input options:
  lasdir                Directory of LAS file(s) to process
  -r [RADIUS [RADIUS ...]], --radius [RADIUS [RADIUS ...]]
                        Create DEM or each provided radius (default: ['0.56'])
  -s SITE, --site SITE  Shapefile of site(s) in same projection as LiDAR
                        (default: None)
  -v, --verbose         Print additional info (default: False)

output options:
  --outdir OUTDIR       Output directory (default: ./)
  --suffix SUFFIX       Suffix to append to output (default: )
  -g, --gapfill         Gapfill using multiple radii products and
                        interpolation (no effect on density products)
                        (default: False)
  -o, --overwrite       Overwrite any existing output files (default: False)

filtering options:
  --maxsd MAXSD         Filter outliers with this SD threshold (default: None)
  --maxangle MAXANGLE   Filter by maximum absolute scan angle (default: None)
  --maxz MAXZ           Filter by maximum elevation value (default: None)
  --returnnum RETURNNUM
                        Filter by return number (default: None)
  --decimation DECIMATION
                        Decimate the points (steps between points, 1 is no
                        pruning (default: None)

The lasdir input is required, and is the location containing the classified las files. If a site shapefile was used to classify the las files, it should also be used here, since the las files will be named based on the site file.

Radii and Gap-Filling

As discussed on the Concepts page, multiple radii can be used to aid in gap-filling. Its utility depends on the type of output (subcommand) chosen:

  • For density outputs, gap-filling is never performed, and the default value of 0.56 for radius is appropriate. This will create a density image where the point density is given in units covering a single pixel.
  • For dsm outputs, gaps are seldom a problem. Within a region of interest, the highest returns in each pixel are considered the top surface and because return densities tend to be higher than 1/m^2 most pixels will have a maximum value returned, although gaps can occur completely flat and barren areas, such as water. In this cases, gap-filling using higher radii outputs yields no benefit. It is suggested the default value of 0.56 be used.
  • For dtm outputs, gap-filling is usually necessary. An initial value of 0.56 (covering the same area as a pixel) should be used, followed by a small number of increasing values such as 0.56 1.41 2.50 3.00. More values will of course take more time, but can provide a better estimate than interpolation alone.

Filtering

A description of each of the filtering options is discussed on the Concepts page. Recommendations for each of the specific products is given below.

  • For density outputs, filtering is not desirable at first. However when compared to a full density image, filtered density images can provide insight as to how much data filtering is removing. Comparing images of before and after scan angle filtering can illustrate any potential gaps from inadequarte flightpath overlap after filtering out edge points.
  • For dsm outputs, the maxsd and maxz filters should usually be used. Most outliers will be non-ground points, usually due to interference with the collection. The maxz filter should be based on the expected values of the region, while maxsd filter should be set to something higher than 2 standard deviations unless a lot of filtering is desired.
  • For dtm outputs, most filtering is usually not desired, except perhaps a maxangle filter if high angle data is suspect.

Output types

There are a few possible outputs for the depending on the DEM type, that use different approaches for calculating the final gridded elevation.

  • density - Output files are only point density images and will have a .den.tif suffix
  • dsm - DSM output is generated by using the maximum elevation within the search radius, and will have a .max.tif suffix. Note that density (.den.tif) files are also created, showing the point density derived from just the points used to make the DSM (non-ground, non-filtered points)
  • dtm - DTM output is generated in a few different ways, and all are available. The minimum (.min.tif) is the minimum point, the maximum (.max.tif) is the maximum point, and idw (.idw.tif) is the Inverse Distance Weighted average of all the points. A density image (.den.tif) is also generated from these points (ground, non-filtered points)

Output filenaming convention

For each polygon, the output directory will contain a file for each output type, for each gridding radius. Example filenames for a single polygon is shown below for each dem type:

# density
features-0_density_r0.56.den.tif

# dsm
features-0_dsm_r0.56.den.tif  features-0_dsm_r0.56.max.tif

# dtm
features-0_dtm_r0.56.den.tif  features-0_dtm_r1.41.den.tif  features-0_dtm_r2.50.den.tif  features-0_dtm_r3.00.den.tif
features-0_dtm_r0.56.idw.tif  features-0_dtm_r1.41.idw.tif  features-0_dtm_r2.50.idw.tif  features-0_dtm_r3.00.idw.tif
features-0_dtm_r0.56.max.tif  features-0_dtm_r1.41.max.tif  features-0_dtm_r2.50.max.tif  features-0_dtm_r3.00.max.tif
features-0_dtm_r0.56.min.tif  features-0_dtm_r1.41.min.tif  features-0_dtm_r2.50.min.tif  features-0_dtm_r3.00.min.tif

After gap-filling, there will also be filenames similar to above but without the radius, as they are gap-filled using all of the files (e.g., features-0_dtm.idw.tif features-0_dtm.max.tif features-0_dtm.min.tif)

Finally, all features will be merged together into a VRT file, which properly aligns it to the same grid as the site shapefile. After generating the DTM, DSM, and CHM for a directory, the final output files of interest will be:

chm.tif  density.den.vrt  dsm.den.vrt  dsm.max.vrt  dtm.den.vrt  dtm.idw.vrt  dtm.max.vrt  dtm.min.vrt