Skip to content

Detect Hummock and Hollow from LiDAR Data

Algorithm details: Technical Guide → Raster Smoothing and Normalized DTM

Maps micro-topography by comparing the terrain with a smoothed copy of itself. For each tile, the tool:

  1. Builds a DTM with rasterize_terrain(algorithm = tin()).
  2. Smooths it with a circular moving window of diameter Min_ws, using the mean or median (terra::focal). The window is the cells whose centres lie within its radius, a true circle also on cells that aren't square; cells with no value are left out, and near the edges of the data the window holds only the real neighbours. Normalized DTM from DTM Raster smooths a DTM you already have the same way.
  3. Subtracts the DTM from the smoothed surface, and classifies each cell using lawn_range:
Cell Value in HH_*.tif
More than lawn_range above the smoothed surface 1 (hummock)
More than lawn_range below the smoothed surface -1 (hollow)
Within ±lawn_range 0 (lawn)

The data must be ground-classified. If the first file has no class 2 points, the tool prints a warning and stops without writing anything. Run Ground Classify Using CSF first. The data must not be normalized either: normalized point clouds have their ground at height 0, so they have no terrain relief and every cell would be lawn. If the ground points of the first file have a mean height under 1 m, the tool stops with an error; use the ground-classified point clouds from before normalization.

Parameter Type Required Description
in_las_folder directory Yes Folder containing the ground-classified LAS/LAZ tiles.
out_folder directory (output) Yes Folder for the output rasters.
Smooth_by mean | median Yes Statistic used to smooth the DTM. The default is mean.
Min_ws float Yes Diameter of the circular moving window, in metres. The default is 3.0.
lawn_range float Yes Height band around the smoothed surface that counts as lawn, in metres. The default is 0.3.
cell_size float No Output cell size in metres. 0 (the default) calculates it from the point density.
tiling auto | by_file | tiling No How the data is split into tiles (see Tiling). The default is auto.
skip_existing bool No Set to True to resume a run that stopped: tiles whose outputs are complete are skipped (see Resuming a run). The default is False.
processes int No Requested number of parallel workers.
Output Contents
CHH_<tile>_<Smooth_by>_<Min_ws>m.tif Continuous height of the terrain relative to the smoothed surface.
HH_<tile>_<Smooth_by>_<Min_ws>m.tif Hummock (1), hollow (-1) and lawn (0) classes.
Merged_CHH_<Smooth_by>_<Min_ws>m.tif, Merged_HH_<Smooth_by>_<Min_ws>m.tif Mosaics of all tiles. Merged_HH_ is a 16-bit integer raster (NA is -32768).
from beratools.modules.pc2products.rpy_PC2hummock_hollow import rpy_hh2raster

rpy_hh2raster(in_las_folder="tests/data/LiDAR/Classified_PC",
              out_folder="tests/data/LiDAR/Raster_Output",
              Smooth_by="median", Min_ws=3.0, lawn_range=0.1, cell_size=0)

Detect Hummock and Hollow from LiDAR Data in the BERA Tools GUI after a run

Command line

bt hh   # show the parameters
bt hh --in_las_folder <las_dir> --out_folder <out_dir> --Smooth_by median --Min_ws 3 --lawn_range 0.1