makeVegTypeMap is a wrapper around vegTypeMapGenerator that works from a species stack of percent cover. These do not have to sum to 100%%

Downloads the 2011 kNN species cover layers from the Canadian Forestry Service, National Inventory System, for validation.

makeVegTypeMap(speciesStack, vegLeadingProportion, mixed, ...)

loadkNNSpeciesLayersValidation(
  dPath,
  rasterToMatch,
  studyArea,
  sppEquiv,
  knnNamesCol = "KNN",
  sppEquivCol,
  thresh = 1,
  url,
  ...
)

prepSpeciesLayers_KNN2011(
  destinationPath,
  outputPath,
  url = NULL,
  studyArea,
  rasterToMatch,
  sppEquiv,
  sppEquivCol,
  thresh = 10,
  ...
)

Arguments

speciesStack

A RasterStack of species abundances. This must be one RasterLayer per species.

vegLeadingProportion

Numeric between 0-1, determining the relative biomass threshold a species needs to pass to be considered "leading".

mixed

Deprecated. See mixedType argument to vegTypeMapGenerator.

...

Additional arguments passed to reproducible::Cache() and equivalentName().

dPath

path to the data directory

rasterToMatch

A RasterLayer objects to use as the template for all subsequent raster operations (i.e., the one used throughout the simulation).

studyArea

A SpatialPolygons* object used as the principle study region, passed to reproducible::prepInputs().

sppEquiv

table with species name equivalencies between the kNN and final naming formats. See data("sppEquivalencies_CA", "LandR"). For functions that have mixedType, this only necessary if mixedType == 2. If not provided and mixedType == 2, will attempt to use data("sppEquivalencies_CA", "LandR").

knnNamesCol

character string indicating the column in sppEquiv containing kNN species names. Default "KNN" for when sppEquivalencies_CA is used.

sppEquivCol

the column name to use from sppEquiv. For functions that have mixedType, only necessary if mixedType == 2. If not provided and mixedType == 2, will attempt to use "Boreal".

thresh

the minimum number of pixels where the species must have biomass > 0 to be considered present in the study area. Defaults to 1.

url

the source url for the data, passed to reproducible::prepInputs()

destinationPath

path to data directory where objects will be downloaded or saved to

outputPath

path to output directory

Value

A factor raster

A raster stack of percent cover layers by species.