Learn R Programming

crownsegmentr (version 1.0.1)

li_diameter_raster: Calculate a raster of crown diameter for tree height for AMS3D

Description

The function calculates a raster with values for crown_diameter_to_tree_height as input for the AMS3D algorithm. It segments the tree crowns with the Li2012 algorithm, calculates a ratio of crown diameter to tree height for each tree, and converts this into a raster.

Usage

li_diameter_raster(
  point_cloud,
  crown_diameter_constant = 0,
  limits = c(0, 1),
  ground_height = NULL,
  smoothing_radius = 5,
  ...
)

Value

terra SpatRaster

Arguments

point_cloud

the input point cloud, either as LAS or as data.frame.

crown_diameter_constant

a fixed value for crown_diameter_constant, which reduces the crown diameters by the given value before calculating the ratio of crown diameter to tree height

limits

a numeric vector with minimum and maximum values for the ratio, at which every tree's ratio will be capped

ground_height

(optional) either

  • NULL, indicating that the point cloud is normalized, or

  • a SpatRaster digital terrain model, or

  • a list of arguments to the lidR rasterize_terrain() function to normalize the point cloud.

smoothing_radius

The radius of the filter used for smoothing the diameter-to-height ratio from individual trees.

...

further parameters will be passed to the function lidR::li2012()

Details

The output raster can serve as input for the parameter "crown_diameter_to_tree_height" for the function segment_tree_crowns. It averages the ratio of crown diameter to tree height for a given radius, for trees that were detected with the Li2012 tree segmentation algorithm.