Last chance! 50% off unlimited learning
Sale ends in
Individual tree detection function that find the position of the trees using several possible algorithms.
tree_detection(las, algorithm)
An object of class LAS
or LAScatalog
. Can also be a RasterLayer
representing a canopy height model, in which case it is processed like a regularly-spaced point cloud.
An algorithm for individual tree detection. lidR has: lmf and manual. More experimental algorithms may be found in the package lidRplugins.
A SpatialPointsDataFrame with an attribute Z for the tree tops and treeID with an individual ID for each tree.
Supported processing options for a LAScatalog
(in bold). For more details see the
LAScatalog engine documentation:
chunk size: How much data is loaded at once.
chunk buffer*: Mandatory to get a continuous output without edge effects. The buffer is always removed once processed and will never be returned either in R or in files.
chunk alignment: Align the processed chunks.
progress: Displays a progression estimation.
output_files: Supported templates are {XLEFT}
, {XRIGHT}
,
{YBOTTOM}
, {YTOP}
, {XCENTER}
, {YCENTER}
{ID}
and,
if chunk size is equal to 0 (processing by file), {ORIGINALFILENAME}
.
select: Load only attributes of interest.
filter: Read only points of interest.
# NOT RUN {
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las <- readLAS(LASfile, select = "xyz", filter = "-drop_z_below 0")
ttops <- tree_detection(las, lmf(ws = 5))
x = plot(las)
add_treetops3d(x, ttops)
# }
Run the code above in your browser using DataLab