mosaic_chm_mask | R Documentation |
This function applies a height-based mask to a Canopy Height Model (CHM),
focusing on areas with heights above a specified lower
threshold and,
optionally, below an upper
threshold.
mosaic_chm_mask(
dsm,
lower,
upper = NULL,
window_size = c(5, 5),
interpolation = "Tps"
)
dsm |
A |
lower |
A numeric value specifying the lower height threshold. All heights greater than this value are retained. |
upper |
An optional numeric value specifying the upper height threshold.
If provided, only heights between |
window_size |
An integer (meters) specifying the window size (rows and columns, respectively) for creating a DTM using a moving window. Default is c(10, 10). |
interpolation |
(optional) A character string specifying the
interpolation method to use when |
The mosaic_chm
function, used internally, generates the DTM from the DSM by
downsampling and smoothing raster data, applying a moving window to extract
minimum values and then interpolating the results. The CHM is computed as the
height difference between the DSM and DTM. This function calculates and
applies a mask based on height thresholds.
An SpatRaster
object representing the masked CHM.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.