apa_list: Calculating APA-maps

Description Usage Arguments Details Value References Examples

View source: R/apa_list.R

Description

Calculate maps of the area potentially available to trees (APA-maps) out of tree inventory data. All vector data that is used or provided by the APAtree-package is stored in data.frames of the additional sf class of the sf-package (referred to as sf-data.frame). APA-maps are raster data that are stored in objects of the raster-package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
apa_list(
  plot_dat,
  tree_dat,
  plot_id_column,
  tree_id_column,
  weight_column,
  agg_class_column = NULL,
  core_column = attr(plot_dat, "sf_column"),
  buffer_column = core_column,
  res = 1,
  subplot_dat = NULL,
  subplot_id_column = NULL,
  radius = 10,
  apa_properties = NA,
  edge_correction = "none",
  dis_trait_column = NULL,
  dis_method = "gowdis",
  dis_transform = sqrt,
  scope = "global",
  apa_polygon = TRUE
)

Arguments

plot_dat

An sf-data.frame with plot-level data. plot.dat must contain a column that specifies the unique id of the plot. the column name of the plot id is specified with the plot_id_column-argument. The plot id is used to relate plot- and tree-data. A column with POLYGON-data that specify the outline of the plots has to be provided.

tree_dat

An sf-data.frame with tree data. tree.dat must contain a unique id of each tree. The column name of the tree id is specified with tree_id_column. Plot and tree-data are related by the id of the plot, which has to be a column in both datasets. The geometry type of tree_dat has to be POINT-data that specifies tree coordinates.

plot_id_column

Column name of plot_dat specifying unique plot id's.

tree_id_column

Column name of tree_dat specifying unique tree id's.

weight_column

Column name of tree_dat that specifies a variable to be used as weighting factor for the calculation of APA-maps.

agg_class_column

An optional vector of column names of tree_dat that specify variables that are used as additional grouping variable (for example tree species) to aggregate apa-properties (see apa_add_agg_class for more details).

core_column

Column name of plot_dat specifying a sfc-column with POLYGON-data of plot boundaries. Default is the active geometry of plot_dat.

buffer_column

Column name of plot_dat specifying a sfc-column with POLYGONs of boundaries of a buffer-zone around the core plot. To specify a buffer is only necessary if trees outside of the core area of a plot were sampled (plus-sampling) and the edge-correction method is "critical". Defaults to core_column.

res

single number specifying the resolution of the APA-maps (identical in x- and y-direction).

subplot_dat

A named list of sf-data.frames with additional data of subplots. If the active geometry column of plot_dat is POLYGON-data, calculation of apa-properties will be done for the area within these POLYGONs. For POINT-data, circular subplots are created around the point coordinates.

subplot_id_column

A named vector specifying the id columns of subplot_dat.

radius

The radius of circular subplots that should be used if a dataset in in subplot_dat contains POINT-data.

apa_properties

A vector specifying the apa-properties that will be calculated. May be any combination of "border_tree", "apa_size", "ndiv" and "pdiv".

edge_correction

which of the implemented edge correction method should be applied when calculating apa-properties ("none", "critical" or "border_tree_exclusion".

dis_trait_column

A list containing combinations of traits that will be used to estimate dissimilarity between trees when calculating apa-properties. Refers to column names of tree_dat.

dis_method

Which method should be used to estimate dissimilarity between trees. If dis_method is gowdis, FD::gowdis() will be used to calculate Gower dissimilarity. Alternatively, dis_method may be any function that calculates a dissimilarity matrix out of a data.frame with trait values.

dis_transform

A function to transform dissimilarities. Defaults to sqrt.

scope

Should scaling of the dissimilarity be done at "global" or at "local" level? If dis_method scales dissimilarity between trees according to the range of occurring values in the dataset (as done by "gowdis"), a "global" scope will use the range of all values in tree_dat. Any other scope will use the range of values at plot-level to scale dissimilarity.

apa_polygon

logical, specifies if POLYGONs of APA-patches be should be added to the datasets. Defaults to TRUE.

Details

APA-maps are derived by calculating a rasterized version of weighted Voronoi-Diagrams of tree coordinates. To each tree a weight may be assigned that reflects the competitive ability of the tree.

Value

apa_list returns an object of class "apa_list". An apa_list is a list of data.frames with at least two elements:

References

Glatthorn, Jonas (2021). A spatially explicit index for tree species or trait diversity at neighborhood and stand level. Ecological Indicators, 130, 108073. https://doi.org/10.1016/j.ecolind.2021.108073.

Römisch,K. (1995) Durchmesserwachstum und ebene Bestandesstruktur am Beispiel der Kiefernversuchsfläche Markersbach. In Deutscher Verband forstl. Forschungsanstalten, Sektion Biometrie und Informatik. Gottfried Hempel (ed.) Tagung Tharanth/Grillenburg, Vol. 8, pp. 84–103.

Gspaltl, M., Sterba, H., & O’hara, K. L. (2012). The relationship between available area efficiency and area exploitation index in an even-aged coast redwood (Sequoia sempervirens) stand. Forestry, 85(5), 567-577.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(APAtree)
data(tree_enrico, package = "APAtree")
data(plot_enrico, package = "APAtree")

tree_enrico$height_class <- tree_enrico$height > 20

# only calculate an apa_list for two plots and with a coarse resolution of 1 m
# to save time.
apa_list_enrico <- 
  apa_list(plot_dat = subset(plot_enrico, id_plot %in% c("5.2", "8.2")), 
           tree_dat = tree_enrico,
           plot_id_column = "id_plot",
           tree_id_column = "id_tree",
           weight_column = "crown_radius_95",
           agg_class_column = c("species", "height_class"),
           res = 1,
           apa_polygon = TRUE)

apa_list_enrico

JonasGlatthorn/APAtree documentation built on Dec. 18, 2021, 1:41 a.m.