forest_parametrization {medfateland}R Documentation

Landscape forest parametrization

Description

Utility functions to define forest inputs in a landscape:

Usage

impute_forests(
  x,
  sf_fi,
  dem,
  forest_map,
  var_class = NA,
  max_distance_km = 100,
  replace_existing = FALSE,
  missing_class_imputation = FALSE,
  missing_class_forest = NULL,
  merge_trees = TRUE,
  merge_shrubs = TRUE,
  progress = TRUE
)

modify_forest_structure(
  x,
  structure_map,
  variable,
  map_var = NA,
  ratio_limits = NULL,
  minDBH = 7.5,
  progress = TRUE
)

check_forests(x, progress = FALSE)

Arguments

x

An object of class sf. If it contains a column named 'land_cover_type', imputation will be performed for locations whose land cover is "wildland". Otherwise, forest imputation is done for all locations. For structural corrections or when checking, x should already contain a column named 'forest' containing forest objects.

sf_fi

An object of class sf with forest inventory data column 'forest'.

dem

A digital elevation model (class SpatRaster) with meters as units

forest_map

An object of class SpatRaster or SpatVector with the forest class map

var_class

Variable name or index containing forest classes in forest_map. If missing the first column is taken.

max_distance_km

Maximum distance, in km, for forest inventory plot imputation.

replace_existing

A logical flag to force the replacement of existing forest objects, when present.

missing_class_imputation

A logical flag to force imputation in locations where forest class is not defined. If missing_class_imputation = TRUE, imputation in those locations will be based on geographic and topographic criteria only.

missing_class_forest

A forest object to be used for locations with missing class.

merge_trees

A logical flag to simplify tree cohorts by merging tree records in DBH classes (see forest_mergeTrees).

merge_shrubs

A logical flag to simplify shrub cohorts by merging shrub records in height classes (see forest_mergeShrubs).

progress

A logical flag to print console output.

structure_map

An object of class SpatRaster or SpatVector with a forest structural variable map

variable

Structural variable to correct. See options in details.

map_var

Variable name or index containing structural variable in 'structure_map'. If missing the first column is taken.

ratio_limits

Limits for ratio of variable in corrections, used to avoid outliers.

minDBH

Minimum diameter for stand metric calculation. If minDBH > 0 then those stands with smaller trees will not be corrected because of the missing stand metric. A special case occurs for correction following basal area (see details).

Details

Function impute_forests() performs imputation of forest inventory plots on target locations provided that they correspond to the same forest class, defined in the input forest map, and are geographically closer than a distance threshold (max_distance_km). Among the multiple stands that can have fulfill these two requirements, the function chooses the one that has the most similar elevation and position in the N-to-S slopes (i.e. the product of the cosine of aspect and slope). Both topographic features are standardized to zero mean and unit standard deviation (using the supplied digital elevation model to calculate those metrics), to make their weight on the imputation equal. This imputation method will be more or less successful depending on the resolution of forest classes and the number of forest inventory plots available for each of them. Additionally, tree and shrub cohorts can be simplified after imputation (merge_trees and merge_shrubs), to reduce the number of records (and hence, speed-up simulations).

Function modify_forest_structure() can be used to modify specific structure variables of the imputed forests building on rasters supplied by the user (typically from aerial or satellite LiDAR products). For any given metric, the function will calculate the ratio of the structure metric between the target forest object (see stand_basalArea) and the input map in the target location. Options for structural variables are the following:

Locations where the metric value in the map is missing are left unmodified. The same happens if metric value is zero, to avoid division by zero. A special case occurs for correction of basal area. In that case, if there are no trees larger than minDBH but structural map indicates positive values of basal area, DBH values will be set to minDBH, and correction of basal area will be performed.

Function check_forest() checks first that forest objects are defined in "wildland" locations. Then, it looks for missing data in tree or shrub attributes required for simulations. The function does not modify the data.

Value

Functions impute_forests() and modify_forest_structure() return a modified object of class sf. Function check_forests() returns an invisible data frame with columns indicating missing forest data and missing values in tree or shrub parameters.

Author(s)

Miquel De Cáceres Ainsa, CREAF

Rodrigo Balaguer-Romano, CREAF

See Also

add_topography(), add_forests(), add_soilgrids(), forest_mergeTrees

Examples

# See package vignettes 'Preparing inputs'

[Package medfateland version 2.4.5 Index]