fhProcess1: FIRE History Processing for FAME stage1

View source: R/fhProcess1.R

fhProcess1R Documentation

FIRE History Processing for FAME stage1

Description

FIRE History Processing for FAME stage1

Usage

fhProcess1(
  inFH,
  inFHLayer = NULL,
  OtherAndUnknown = 2,
  validFIRETYPE = c("BURN", "BUSHFIRE", "UNKNOWN", "OTHER"),
  secondFH = NULL,
  secondFHLayer = NULL,
  baseFire = NULL
)

Arguments

inFH

Input fire history polygon/mutipolygon data set with columns SEASON and FIRETYPE provided as shapefile, geopackage or ESRI geodatabase file, or the name of an sf object. if the geometries contain other than polygon/mutipolygon an error will result.

inFHLayer

Layer name if inFH has more than one layer ( for instance in a .gpkg) this allows selection of a particular layer, otherwise fist layer is used (Default = NULL)

OtherAndUnknown

integer Value to use for cases where fire type is: "OTHER" or "UNKNOWN" = NA, "BURN" = 1, "BUSHFIRE" = 2. NA = Fire excluded from analysis. (usually set in settings file)

validFIRETYPE

vector of valid firetype names in the input FIRETYPE column, if the column contains NA or values not on this list an error will occur

secondFH

Second fire history to be combined with FH1 to make a fire scenario same formats as for inFH

baseFire

Default NULL otherwise four digit integer SEASON for fire applied #' across the whole bounding box

secondFHlayer

Layer name if secondFH has more than one layer ( for instance in a .gpkg) this allows selection of a particular layer, otherwise fist layer is used (Default = NULL)

Details

Takes a spatial polygon data file or r sf polygon collection checks that it contains the correct fields, and projection for FAME analysis ( using helper function checkFH) including fields FIRETYPE and SEASON Where polygons of different FIRETYPE or SEASON overlap the mainFHProcess() fucntion called in this function constructs unique non-overlapping polygon of their intersections ( and non intersecting areas ) and attributes each polygon with sequential fire SEASON (SEAS01, SEAS02 ...) and corresponding FIRETYPE (TYPE01,TYPE02 ...)

Value

inFH1 an sf geometry collection of processed fire history for input into fhProcess2()

See Also

checkFH() for checking function run from within fhprocess1() mainFHProcess main processing function to derive Fire history analysis for FAME prepFH helper function that splits larger inFH files into gridded subunits for parallel processing.

Examples

# randomFH<-generate_random_fire_history(20)
# plot(randomFH)
# outFH1<-fhProcess1(randomFH)
# plot(outFH1)
# #complete all fields in FH analysis
# outFH2<-fhProcess2(outFH1)
#
# plot(outFH2$OutDF,max.plot = 20)



nevilamos/FAMEFMR documentation built on April 17, 2025, 9:32 p.m.