Skip to contents

This function extracts height-related summary statistics from a CHM using a given shapefile.

Usage

mosaic_chm_extract(chm, shapefile, chm_threshold = NULL)

Arguments

chm

An object computed with mosaic_chm().

shapefile

An sf object containing the polygons over which height metrics are extracted.

chm_threshold

A numeric value representing the height threshold for calculating coverage. If NULL, coverage is not computed.

Value

An sf object containing height summary statistics for each plot, including:

  • min: Minimum height value.

  • q05: 5th percentile height value.

  • q50: Median height value.

  • q95: 95th percentile height value.

  • max: Maximum height value.

  • mean: Mean height value.

  • volume: Total sum of heights multiplied by CHM resolution.

  • coverage: If a mask is used in mosaic_chm() or chm_threshold is informed, returns the proportion of pixels covered within the plot. Otherwise, returns 1.