Skip to contents

fire_exp_dir() automates the directional vulnerability assessment methods from Beverly and Forbes 2023. This function can return the assessment transects as a spatial feature of transect segments or a table of each transect segment as a data frame The exposure layer and value layer must have a CRS defined. If a polygon is used, it must be a simple feature without holes or complex geometry. The function will not run if the polygon should be simplified further. See Forbes and Beverly 2024 (Manuscript in preparation) for data preparation advice.

Usage

fire_exp_dir(exposure, value, table = FALSE)

Arguments

exposure

SpatRaster (e.g. from fire_exp())

value

Spatvector of value as a point or simplified polygon

table

Boolean, when TRUE: returns a table instead of a feature. The default is FALSE.

Value

a SpatVector of the transects with a attributes: degree, segment, viable. Unless:

  • table = TRUE: a data frame

Examples

# read example hazard data ----------------------------------
filepath <- "extdata/hazard.tif"
haz <- terra::rast(system.file(filepath, package = "fireexposuR"))
# generate an example point ---------------------------------
wkt <- "POINT (500000 5000000)"
pt <- terra::vect(wkt, crs = haz)
# -----------------------------------------------------------

exp <- fire_exp(haz)

fire_exp_dir(exp, pt)
#>  class       : SpatVector 
#>  geometry    : lines 
#>  dimensions  : 1080, 3  (geometries, attributes)
#>  extent      : 485006, 514994, 4985006, 5014994  (xmin, xmax, ymin, ymax)
#>  coord. ref. : WGS 84 / UTM zone 8N (EPSG:32608) 
#>  names       :   deg   seg viable
#>  type        : <int> <chr>  <num>
#>  values      :     1   to5      0
#>                    1  to10      0
#>                    1  to15      1