Learn R Programming

lidR (version 1.6.1)

lastrees: Individual tree segmentation

Description

Individual tree segmentation with several possible algorithms. The function is a wrapper around all the existing methods. Considering the increasing number of tree segmentation methods available, each method is now documented on its own page (see section "See Also")

Usage

lastrees(las, algorithm, ...)

Arguments

las

An object of the class LAS. If missing, extra is turned to TRUE automatically.

algorithm

character. The name of an algorithm. Can be "dalponte2016", "watershed","li2012" (deprecated), "li2012-2" or "silva2016".

...

parameters for the algorithms. These depend on the algorithm used (see documentation of each method).

Value

Usually nothing (NULL). The point cloud is updated by reference (in place without copy). But some algorithms may provide extra outputs. Usually it returns intermediate objects used internally, such as a RasterLayer or a SpatialPolygonDataFrame.

See Also

Other tree_segmentation: lastrees_dalponte, lastrees_li2, lastrees_silva, lastrees_watershed

Examples

Run this code
# NOT RUN {
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las = readLAS(LASfile, select = "xyz", filter = "-drop_z_below 0")
col = pastel.colors(200)

# Li 2012
lastrees(las, "li2012-2", R = 3, speed_up = 5)
plot(las, color = "treeID", colorPalette = col)
# }

Run the code above in your browser using DataLab