Overlay different LCC data sources

overlayLCCs(
  LCCs,
  forestedList,
  outputLayer,
  NAcondition,
  NNcondition,
  remapTable = NULL,
  classesToReplace,
  availableERC_by_Sp,
  forestEquivalencies = NULL
)

Arguments

LCCs

A named list or named RasterStack of layers whose content is Land Cover Class.

forestedList

A named list of same length and names as LCCs indicating which classes in each LCC raster are 'forested', either permanent or transient

outputLayer

A character string that matches one of the named elements in LCCs. This will be the classification system returned.

NAcondition

The condition when a pixel is deemed to be NA. Given as a character string of a vectorized logical statement that will be within the forestEquivalencies table. It should be a set of conditions with == 0, i.e., non-forested. Examples:, e.g., "LCC2005 == 0" or "CC == 0 | LCC2005 == 0", where 0 is the non-forested pixels based on converting LCCs and forestedList to 1 and 0.

NNcondition

The 'nearest-neighbour' condition; i.e., the condition when a nearest-neighbour search is done to fill in the pixel with forested type. Given as a character string of a vectorized logical statement that will be parsed within the forestEquivalencies table. It should be a set of conditions with == 0, i.e., non-forested. Examples:, e.g., "LCC2005 == 0" or "CC == 0 | LCC2005 == 0", where 0 is the non-forested pixels based on converting LCCs and forestedList to 1 and 0.

remapTable

data.table. This would be for a situation where 2 LCC layers are provided, one has information in a pixel, but not the one which is outputLayer, so this needs a reclassify or remap.

classesToReplace

Passed to convertUnwantedLCC(), for the pixels where NNcondition is TRUE

availableERC_by_Sp

Passed to convertUnwantedLCC(), for the pixels where NNcondition is TRUE. If this is NULL, then it will be created internally with all pixels with: data.table(initialEcoregionCode = LCCs[[outputLayer]][])

forestEquivalencies

A data.frame or NULL. If NULL, this function will derive this table automatically from the other arguments. Otherwise, the user must provide a data.frame with length(LCCs) + 1 columns, and 2 ^ length(LCCs) rows. Currently not used.

Author

Eliot McIntire and Alex Chubaty