Creates the RRM ecosystem outpout for skeena bear and moose model

create_RRM_ecosystem_from_scratch(
  dsn,
  vri_dsn = dsn,
  bem_dsn = dsn,
  rivers_dsn = dsn,
  wetlands_dsn = dsn,
  ccb_dsn = dsn,
  elevation_dsn,
  layers_names_list = list(vri = "VEG_R1_PLY_polygon", bem = "BEM", rivers =
    "FWA_RIVERS_POLY", wetlands = "FWA_WETLANDS_POLY", ccb = "CNS_CUT_BL_polygon"),
  beu_bec_csv = "csv/Allowed_BEC_BEUs_NE_ALL.csv",
  beu_wetland_update_csv = "csv/beu_wetland_updates.csv",
  rules_xl,
  unique_ecosystem = "csv/Skeena_VRIBEM_LUT.csv",
  clear_site_ma = TRUE,
  use_ifelse = TRUE,
  most_recent_harvest_year,
  elevation_threshold = 1400,
  wkt_filter = character(0),
  n_iterations = 1,
  verbose = TRUE
)

Arguments

dsn

data source name (interpretation varies by driver - for some drivers, dsn is a file name, but may also be a folder, or contain the name and access credentials of a database); in case of GeoJSON, dsn may be the character string holding the geojson data. It can also be an open database connection.

vri_dsn

dsn for vri layer, default to dsn if empty

bem_dsn

dsn for bem layer, default to dsn if empty

rivers_dsn

dsn for rivers layer, default to dsn if empty

wetlands_dsn

dsn for wetlands layer, default to dsn if empty

ccb_dsn

dsn for ccb layer, default to dsn if empty

elevation_dsn

dsn for elevation raster, must be provided because cannot be part of a .gbd , needs to be .tif

layers_names_list

named list that contains the layer name for the vri, bem, rivers, wetlands and ccb layers

beu_bec_csv

dsn for beu bec csv

beu_wetland_update_csv

dsn for wetlands correction csv

rules_xl

dsn for excel file of rules for improvement of beu

unique_ecosystem

dsn for unique ecosystem csv filled with values

clear_site_ma

boolean, if TRUE variable SITE_M1A, SITE_M2A will be cleared

use_ifelse

boolean, if TRUE correction done after the combine_duplicated_BEUMC will only be applied on rows that were not affected by the correction of duplicated BEUMC

most_recent_harvest_year

integer that represent the most recent harvest year

elevation_threshold

numeric elevation threshold used to create above elevation indicator (ABOVE_ELEV_THOLD)

wkt_filter

character; WKT representation of a spatial filter (may be used as bounding box, selecting overlapping geometries)

n_iterations

integer number of iterations, usefull when running out of RAM to load smaller areas and iterate over them one at a time

verbose

boolean , if TRUE function will return message to indicate progress throughout the function execution

Value

Summary of Area by unique ecosystem

Details

For each of the following combination compute the sum of the area

  • ECO_SEC

  • BGC_ZONE

  • BGC_SUBZON

  • BGC_VRT

  • BGC_PHASE

  • BEUMC (BEUMC_S1, BEUMC_S2, BEUMC_S3)

  • SLOPE_MOD

  • SITE_M3A

  • SNOW_CODE

  • ABOVE_ELEV

  • CROWN_MOOSE (CROWN_MOOSE_1, CROWN_MOOSE_2, CROWN_MOOSE_3)

  • STRCT (STRCT_S1, STRCT_S2, STRCT_S3)

  • STAND (STAND_A1, STAND_A2, STAND_A3)

  • FORESTED (FORESTED_1, FORESTED_2, FORESTED_3)

For STRCT and STAND every combination is also made with the projected age values.