process_pcl: Process single PCL transects.

View source: R/process_pcl.R

process_pclR Documentation

Process single PCL transects.

Description

process_pcl imports and processes a single PCL transect.

Usage

process_pcl(
  f,
  method = NULL,
  data.type = NULL,
  user_height = NULL,
  k = NULL,
  transect.length = NULL,
  marker.spacing = NULL,
  max.vai = NULL,
  ht.thresh = NULL,
  pavd = FALSE,
  hist = FALSE,
  save_output = TRUE
)

Arguments

f

the name of the filename to input <character> or a data frame <data frame>.

method

"MH" is MacArthur-Horn and "Bohrer" is the Bohrer method

data.type

describes the type of data that is being feed into process_pcl the options are "continuous" for data without data markers (i.e. -99999999 but 'forestr' is going to read any negative return_distance as a data marker), and "divided" data with data markers.

user_height

the height of the laser off the ground as mounted on the user in meters. default is 1 m

k

correction coeff for MH method (default is 1)

transect.length

for 'continuous' data without markers, a total transect length is needed.

marker.spacing

distance between markers, defaults is 10 m

max.vai

the maximum value of column VAI. The default is 8. Should be a max value, not a mean.

ht.thresh

the height at which to filter values below default is 60 m

pavd

logical input to include Plant Area Volume Density Plot from plot_pavd, if TRUE it is included, if FALSE, it is not.

hist

logical input to include histogram of VAI with PAVD plot, if TRUE it is included, if FALSE, it is not.

save_output

the name of the output folder where to write all the output fields.

Details

This function imports raw pcl data or existing data frames of pcl data and writes all data and analysis to a series of .csv files in an output directory (output) keeping nothing in the workspace.

process_pcl uses a workflow that cuts the data into 1 meter segments with z and x positions in coordinate space where x refers to distance along the ground and z refers to distance above the ground. Data are normalized based on light extinction assumptions from the Beer-Lambert Law to account for light saturation. Data are then summarized and metrics of canopy structure complexity are calculated.

process_pcl will write multiple output files to disk in an output directory that process_pcl creates within the work directing. These files include:

1. an output variables file that contains a list of CSC variables and is written by the subfunction write_pcl_to_csv 2. a summary matrix, that includes detailed information on each vertical column of LiDAR data written by the subfunction write_summary_matrix_to_csv 3. a hit matrix, which is a matrix of VAI at each x and z position, written by the subfunction write_hit_matrix_to_pcl 4. a hit grid, which is a graphical representation of VAI along the x and z coordinate space. 5. optionally, plant area/volume density profiles can be created by including pavd = TRUE that include an additional histogram with the optional hist = TRUE in the process_pcl call.

Value

writes the hit matrix, summary matrix, and output variables to csv in an output folder, along with hit grid plot

See Also

process_multi_pcl

Examples


# Run process complete PCL transect without storing to disk
uva.pcl <- system.file("extdata", "UVAX_A4_01W.csv", package = "forestr")

process_pcl(uva.pcl, method = "MH", user_height = 1.05,
k = 1, marker.spacing = 10, ht.thresh = 60, pavd = FALSE, hist = FALSE, save_output = FALSE)

# with data frame
process_pcl(osbs, marker.spacing = 10, user_height = 1.05, method = "Bohrer", k = 1,
max.vai = 8, ht.thresh = 60, pavd = FALSE, hist = FALSE, save_output = FALSE)



atkinsjeff/forestr documentation built on Dec. 12, 2023, 5:36 a.m.