CrownMetrics: LiDAR-derived individual tree crown metrics

Description Usage Arguments Details Value Author(s) Examples

View source: R/CrownMetrics.R

Description

Compute individual tree crown metrics from lidar data

Usage

1
CrownMetrics(xyziId)

Arguments

xyziId

A 5-column matrix with the x, y, z coordinates, intensity and the tree id classification for the LiDAR point cloud.

Details

# List of the individual tree crown metrics:

Value

Returns A matrix of the LiDAR-based metrics for the individual tree detected.

Author(s)

Carlos Alberto Silva

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#=======================================================================#
# Individual tree detection using K-means cluster
#=======================================================================#
# Importing LAS file:
LASfile <- system.file("extdata", "LASexample1.las", package="rLiDAR")

# Reading LAS file
LAS<-readLAS(LASfile,short=TRUE)

# Setting the xyz coordinates and subsetting the data
xyzi<-subset(LAS[,1:4],LAS[,3] >= 1.37)

# Finding clusters (trees)
clLAS<-kmeans(xyzi[,1:2], 32)

# Set the tree id vector
Id<-as.factor(clLAS$cluster)

# Combining xyzi and tree id 
xyziId<-cbind(xyzi,Id)

#=======================================================================#
#  Computing individual tree LiDAR metrics 
#=======================================================================#

TreesMetrics<-CrownMetrics(xyziId)
head(TreesMetrics)

rLiDAR documentation built on Oct. 5, 2021, 9:07 a.m.

Related to CrownMetrics in rLiDAR...