segment_with_spanner: Create a stem map from a TLS scan tile using spanner.

View source: R/spanner_segment.R

segment_with_spannerR Documentation

Create a stem map from a TLS scan tile using spanner.

Description

This is code to make it more convenient to pre-process, stem map, and segment TLS tiles. The function takes a merged TLS scan and a boundary and generates a stem map (.shp) attributed with stem radius, and height. You may optionally output a LAS with the segmented trees by specifying a path name (*.las) in the argument tree_seg_las. If left NULL, only the stem map will be written to disk. Note that there are large memory requirements and you may encounter memory issues if you use this on areas larger than 0.2 ha with high scan densities.

Usage

segment_with_spanner(las, bnd, tree_seg = TRUE, threads = 0.5)

Arguments

las

a LAS object not much larger than 0.2 ha

bnd

an sf object representing the interior boundary of the study area. Generally bnd is smaller than the bbox of las to adjust edge effects

tree_seg

logical. if TRUE a LAS object with segment treees is returned along with stemamp

threads

see lidR::set_lidR_threads. Positive scalar. Default 0 means use all CPU available. Values > 1 mean using n cores, values in (0, 1) mean using a fraction of the cores e.g. 0.5 = half.


jbcannon/landecoutils documentation built on July 16, 2025, 10:17 p.m.