ForestCAS: Individual trees crown deliniation from LiDAR-derived Canopy...

Description Usage Arguments Value Author(s) Examples

View source: R/ForestCAS.R

Description

Delineate and compute ground-projected area of individual tree crowns detected from LiDAR-derived CHM

Usage

1
ForestCAS(chm, loc, maxcrown, exclusion)

Arguments

chm

A LiDAR-derived Canopy Height Model (CHM) RasterLayer or SpatialGridDataFrame file.

loc

A matrix or dataframe with three columns (tree xy coordinates and height).

maxcrown

A single value of the maximum individual tree crown radius expected. Default 10.0 m.

exclusion

A single value from 0 to 1 that represents the % of pixel exclusion. E.g. a value of 0.5 will exclude all of the pixels for a single tree that has a height value of less than 50% of the maximum height from the same tree. Default value is 0.3.

Value

Returns a list that contains the individual tree canopy boundary polygons and the 4-column matrix with the tree xy coordinates, heights and ground-projected canopy area (with units of square meters).

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
28
29
30
31
32
33
34
35
36
37
38
39
40
# This takes > 5s
library(raster)
 
# Import the LiDAR-derived CHM file
data(chm) # or set a CHM. e.g. chm<-raster("CHM_stand.asc") 

# Set the loc parameter
sCHM<-CHMsmoothing(chm, filter="mean", ws=5) # smoothing CHM
loc<-FindTreesCHM(sCHM, fws=5, minht=8)      # or import a tree list

# Set the maxcrown parameter
maxcrown=10.0 

# Set the exclusion parameter
exclusion=0.3 # 30

# Compute individual tree detection canopy area
canopy<-ForestCAS(chm, loc, maxcrown, exclusion)

#==================================================================================#
# Retrieving the boundary for individual tree detection and canopy area calculation
#==================================================================================#
boundaryTrees<-canopy[[1]]
# Plotting the individual tree canopy boundary over the CHM
plot(chm, main="LiDAR-derived CHM") 
 
# adding tree canopy boundary
plot(boundaryTrees, add = TRUE, border = 'red', bg = 'transparent')

#============================================================================#
# Retrieving the list of individual trees detected for canopy area calculation
#============================================================================#
canopyList<-canopy[[2]] # list of ground-projected areas of individual tree canopies
summary(canopyList)     # summary 

# Spatial location of the trees
library(sp)
XY<-SpatialPoints(canopyList[,1:2])    # Spatial points
plot(XY, col = "black", add = TRUE, pch = "*")  # adding tree location to the plot
 

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

Related to ForestCAS in rLiDAR...