1 - Generate DHM#

Algorithm ID: hedgetools:generatedhm

This tool generates a Digital Height Model (DHM) from a Digital Terrain Model (DTM) and a Digital Surface Model (DSM).
The Digital Height Model (DHM) represents the height of objects above the ground surface, such as trees or buildings.

The binary mask will be used to generate the tree cover layer in Generate Tree Cover.

The DHM output can be used to generate additional binary masks with the Raster Calculator or within HedgeTools metrics, such as Strata Proportion.

Parameters#

Label

Name

Type

Description

Input DTM

DTM

[raster]

Digital Terrain Model describing the ground elevation including obstacles (trees, buildings, etc.)

DTM elevation band

DTM_BAND

[raster band]
Default: 1

Elevation band of the DTM raster in case of multiband

Input DSM

DSM

[raster]

Digital Surface Model describing the ground elevation without obstacles

DSM elevation band

DSM_BAND

[raster band]
Default: 1

Elevation band of the DSM raster in case of multiband

Extent of the study area
Optional

EXTENT

[extent]
Optional

Input extent from a layer, canvas, or other source to clip the rasters

Height value threshold (DHM mask)
Optional

THRESHOLD_MASK

[numeric: double]
Optional
Default: 2.50

Height threshold for the binary mask of DHM, used to generate tree cover

Handling of extent differences

EXTENT_OPT

[enumeration]
Default: 0

Determines how the tool handles differing DSM and DTM extents:

  • 0: Ignore – Only check input dimensions – raise error if dimensions differ.
  • 1: Fail – Check both CRS and dimensions – raise error if not equal.
  • 2: Union – Execute algorithm on the union of inputs.
  • 3: Intersect – Execute on intersection – raise error if no overlap.

Output resolution (meters)
Optional

RESOLUTION

[numeric: double]
Optional
Default: [same as input]

Change the output raster resolution to the desired value.

Resampling method
Optional

RESAMPLING

[enumeration]
Optional
Default: 0

Resampling method for output resolution:

  • 0: None
  • 1: Nearest Neighbour
  • 2: Bilinear (2x2 Kernel)
  • 3: Cubic (4x4 Kernel)
  • 4: Cubic B-Spline (4x4 Kernel)
  • 5: Lanczos (6x6 Kernel)
  • 6: Average
  • 7: Mode
  • 8: Maximum
  • 9: Minimum
  • 10: Median
  • 11: First Quartile (Q1)
  • 12: Third Quartile (Q3)

Output DHM

OUTPUT_DHM

[raster]
Default: [Create temporary layer]

Output raster.

Output mask

OUTPUT_MASK

[raster]
Default: [Create temporary layer]

Output raster.

Warning

A lower height value threshold can introduce significant noise from tall crops, such as maize or sunflower, and may cause errors when creating the topological polygon. However, it can also help retain hedges with mainly bushes.

Warning

The output resolution of your mask should match the resolution used in Generate NDVI. You can set this using the Output Resolution parameter.
Typical resampling methods are Average for downsampling and Nearest Neighbour for upsampling.

Outputs#

Label

Name

Type

Description

Output DHM

OUTPUT_DHM

[raster]

Digital Height Model representing the height of objects above ground.

Output mask

OUTPUT_MASK

[raster]

Binary DHM mask where values above the threshold are set to 1.