tree.detection.several.plots {FORTLS} | R Documentation |
Tree-Level Variables Estimation for Several Plots
Description
This function integrates both, the normalize
and tree.detection.single.scan
or tree.detection.multi.scan
functions, generating the same ‘Output Files’ as indicated for these, and it returs the same ‘Value’ as described for tree.detection.single.scan
or tree.detection.multi.scan
respectively. However, this function is designed for working with several plots, producing a list of all scans considered automatically from LAS files.
Usage
tree.detection.several.plots(las.list, id.list = NULL, file = NULL,
scan.approach = "single",
pcd.red = NULL, normalized = NULL,
center.coord = NULL,
x.side = NULL, y.side = NULL,
max.dist = NULL, min.height = NULL, max.height = 50,
algorithm.dtm = "knnidw", res.dtm = 0.2,
csf = list(cloth_resolution = 0.5),
intensity = NULL, RGB = NULL,
single.tree = NULL,
dbh.min = 4, dbh.max = 200, h.min = 1.3,
ncr.threshold = 0.1,
tls.resolution = NULL, tls.precision = NULL,
density.reduction = 2,
stem.section = c(0.7, 3.5), stem.range = NULL, breaks = NULL,
slice = 0.1, understory = NULL, bark.roughness = 1,
den.type = 1, d.top = NULL,
plot.attributes = NULL, plot = NULL,
dir.data = NULL, save.result = TRUE, dir.result = NULL)
Arguments
las.list |
Character vector containing the names of all LAS files for analysis and belonging to TLS point cloud, including .las extension (see ‘Examples’) |
id.list |
Optional vector with plots identification encoded as character string or numeric. If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, the plots will be encoded with correlative numbers from 1 to n plots. |
file |
Optional vector containing files name identification encoded as character string or numeric value. If it is null, file will be encoded as |
scan.approach |
Character parameter indicating TLS single-scan (‘single’) or TLS multi-scan approach or SLAM point clouds (‘multi’) approaches. If this argument is not specified by the user, it will be set to ‘multi’ approach. |
pcd.red |
Optional argument to indicate if point cloud density must be reduced to detect trees. |
normalized |
Optional argument to establish as |
center.coord |
Planimetric x and y center coordinate of the plots. They has to be introduced as a data frame object with the following columns names: 'id', 'x' and 'y'. They represent plot id, and center coordinates respectively. |
x.side |
x-side (m) of the plot when the plot is square or rectangular. |
y.side |
y-side (m) of the plot when the plot is square or rectangular. |
max.dist |
Optional maximum horizontal distance (m) considered from the plot centre. All points farther than |
min.height |
Optional minimum height (m) considered from ground level. All points below |
max.height |
Optional maximum height (m) considered from ground level. All points above |
algorithm.dtm |
Algorithm used to generate the digital terrain model (DTM) from the TLS point cloud. There are two posible options based on spatial interpolation: ‘tin’ and ‘knnidw’ (see ‘Details’). If this argument is not specified by the user, it will be set to ‘knnidw’ algorithm. |
res.dtm |
Numeric parameter. Resolution of the DTM generated to normalize point cloud (see ‘Details’). If this argument is not specified by the user, it will be set to 0.2 m. |
csf |
List containing parameters of CSF algorithm: |
-
cloth_resolution
: by default 0.5.
intensity |
Logical parameter useful when point clouds have intensity values. It may be useful in some internal process to filter data. |
RGB |
Logical parameter useful when point clouds are colorized, thus including values of RGB colors. It is based on the Green Leaf Algorithm (GLA) (see ‘Details’). |
single.tree |
Optional argument to indicate if there is only one tree. |
dbh.min |
Optional minimum dbh (cm) considered for detecting trees. By default it will be set at 4 cm. |
dbh.max |
Optional maximum dbh (cm) considered for detecting trees. By default it will be set at 200 cm. |
h.min |
Optional minimum h (m) considered for detecting trees. By default it will be set at 1.3 m. |
ncr.threshold |
Local surface variation (also known as normal change rate, NCR). By default it will be set as 0.1. For better understanding of this argument see ‘Details’. |
tls.resolution |
List containing parameters of TLS resolution. This can be defined by the angle aperture: |
-
horizontal.angle
: horizontal angle aperture (degrees). -
vertical.angle
: vertical angle aperture (degrees). -
point.dist
: distance (mm) between two consecutive points. -
tls.dist
: distance (m) from TLS at which two consecutive points are separated bypoint.dist
.If this argument is not specified by the user, it will be set to NULL by default and, as a consequence the function will stop giving an error message.
tls.precision |
Optional argument indicating the average point cloud precision in cm. |
density.reduction |
Density reduction intensity. |
stem.section |
Section free of noise (shurb, branches, etc.) considered to detect trees. If not specified, an automatic internal algorithm will be applied (see ‘Details’). |
breaks |
Height above ground level (m) of slices considered for detecting trees. By default it will be considered all possible sections from 0.1 m to maximum height by 0.3 m intervals (+/- 5 cm). |
stem.range |
Section considered to estimate straightness tree attributes. |
slice |
Slice width considered for detecting trees. By default it will be considered as 0.1 m. |
understory |
Optional argument to indicate if there is dense understory vegetation. |
bark.roughness |
Bark roughness established in 3 degrees (1 < 2 < 3). By default it will be considered as 2. |
den.type |
Numeric argument indicating the dendrometic type used to estimate volumen when there are not sections enough to fit a taper equation. Dendrometrics types available are the following: cylinder = 0, paraboloid = 1 (by default), cone = 2 and neiloid = 3. |
d.top |
Top stem diameter (cm) considered to estimate commercial timber volume. |
plot.attributes |
Data frame with attributes at plot level. It must contain a column named |
plot |
Optional logical which indicates whether or not the normalized point cloud will be plot. If this argument is not specified by the user, it will be set to |
dir.data |
Optional character string naming the absolute path of the directory where LAS files containing TLS point clouds are located. |
save.result |
Optional logical which indicates whether or not the output files described in ‘Output Files’ section should be saved in the |
dir.result |
Optional character string naming the absolute path of an existing directory where files described in ‘Output Files’ section will be saved. |
Details
See normalize
, tree.detection.single.scan
and tree.detection.multi.scan
for further details.
Value
Data frame with the same description and format as tree.detection.single.scan
and tree.detection.multi.scan
‘Values’. In this case, the id
of plots will be encoded with correlative numbers from 1 to n, where n is the number of LAS files included in files
argument, and file
column will be encoded as id
, but including .las extension.
Output Files
At the end of the tree detection process, if the save.result
argument is TRUE
, the function will save both, the reduced point clouds as TXT files encoded according to file
column of ‘Value’; and the data frame with the tree list described in ‘Value’ as CSV file (see normalize
and tree.detection.single.scan
or tree.detection.multi.scan
‘Output files’). All outputs are written without row names in the dir.result
directory using vroom_write
function from vroom package.
Note
This function has been developed for working with several plots, which will be the most common situation in forest inventory approaches. Nevertheless, several LAS files are not provided as examples due to problems with memory capacity.
Author(s)
Juan Alberto Molina-Valero and Adela MartÃnez-Calvo.
See Also
normalize
, tree.detection.single.scan
,tree.detection.multi.scan
, distance.sampling
, estimation.plot.size
, simulations
, metrics.variables
.
Examples
# Establishment of working directories (optional)
# By default here we propose the current working directory of the R process
dir.data <- getwd()
dir.result <- getwd()
# Loading example data (LAZ files) to dir.data
download.file(
"www.dropbox.com/scl/fi/hzzrt0a39crdy6uvcj9el/PinusSylve1.laz?rlkey=svpwvorkm8889fgbnj14ns1f2&dl=1",
destfile = file.path(dir.data, "PinusSylvestris1.laz"),
mode = "wb")
download.file(
"www.dropbox.com/scl/fi/zeszze31jh5m1g4o3ns1o/PinusSylve2.laz?rlkey=wx72bi6ggdc7wedwgzupekp9k&dl=1",
destfile = file.path(dir.data, "PinusSylvestris2.laz"),
mode = "wb")
# Obtaining a vector with names of LAZ files located in dir.data
files <- list.files(pattern = "laz$", path = dir.data)
# Tree detection (TLS single-scan aproach)
tree.tls <- tree.detection.several.plots(las.list =
c("PinusSylvestris1.laz",
"PinusSylvestris2.laz"),
id = c("PinusSylvestris1",
"PinusSylvestris2"),
tls.resolution = list(point.dist = 7.67, tls.dist = 10),
breaks = c(1, 1.3, 1.6), stem.section = c(0.5, 4.5))