Learn R Programming

TreeLS (version 2.0.2)

treePoints: Classify individual tree regions in a point cloud

Description

Assigns TreeIDs to a LAS object based on coordinates extracted from a treeMap object. Tree region segmentation methods are prefixed by trp.

Usage

treePoints(las, map, method = trp.voronoi())

Arguments

las

LAS object.

map

object generated by treeMap.

method

tree region algorithm. Currently available: trp.voronoi and trp.crop.

Value

LAS object.

Examples

Run this code
# NOT RUN {
file = system.file("extdata", "pine_plot.laz", package="TreeLS")
tls = readTLS(file) %>%
  tlsNormalize %>%
  tlsSample

map = treeMap(tls, map.hough())
tls = treePoints(tls, map, trp.crop(circle=FALSE))

x = plot(tls, size=1)
add_treePoints(x, tls, size=2)
add_treeIDs(x, tls, color='yellow', cex=2)
# }

Run the code above in your browser using DataLab