plantAreaIndex.Rd
Computes Plant Area Index (PAI) from Plant Area Density (PAD). PAI is defined as the plant area per unit ground surface area (PAI = plant area / ground area = m^2 / m^2).
The function can estimate PAI on the whole voxel space or any region of interest (parameter vx subset of voxels). It can compute PAI from several perspectives : either an averaged PAI value, a two-dimensions (i, j) PAI array or vertical profiles either above ground or below canopy.
plantAreaIndex(
vxsp,
vx,
type = c("av", "ag", "bc", "xy"),
pattern.pad = "^pad_*"
)
a VoxelSpace
object.
a subset of voxel index. A data.table with i, j, k
columns.
Missing parameter means whole voxel space.
a character vector, the type of PAI profile.
"av"
Averaged value on every voxel
"ag"
Above ground vertical profile
"bc"
Below canopy vertical profile
"xy"
Spatial profile
character string containing a regular expression to be matched in the voxel space variable names, for selecting PAD variables. Typing the name of a specific PAD variable works just fine.
Returns a list of PAI profiles for requested PAD variables and PAI types.
av
Averaged PAIReturns a single value. Calculated as the sum of PAD values multiplied by voxel volume and divided by ground surface with vegetation.
ag & bc
Above ground and below canopy PAI vertical profileReturns a vertical profile of PAI values either from ground distance or canopy depth. Calculated as the averaged PAD values per layer (a layer being defined by either the distance to ground or canopy level) multiplied by voxel size along z (equivalent to multiplying PAD by voxel volume and dividing by voxel ground surface).
vxsp <- readVoxelSpace(system.file("extdata", "tls_sample.vox", package = "AMAPVox"))
vxsp@data <- merge(vxsp@data, plantAreaDensity(vxsp), by = c("i", "j", "k"))
if (FALSE) {
lai <- plantAreaIndex(vxsp)
names(lai)
library(ggplot2)
ggplot(data = lai[["pad_transmittance.pai.ag" ]], aes(x=pai, y=ground_distance)) +
geom_path() + geom_point()
}
# PAI on a subset
ni <- round(dim(vxsp)[1]/2)
vx <- vxsp@data[i < ni, .(i, j, k)]
lai <- plantAreaIndex(vxsp, vx)