This function overlays the user-specified polygon feature class with slope and aspect raster to add mean aspect, mean slope and slope modifiers to the polygon attributes

merge_elevation_raster_on_sf(
  elev_raster,
  vri_bem,
  elevation_threshold = 1400,
  terrain_raster = NULL
)

Arguments

elev_raster

SpatRaster object that represent the elevation

vri_bem

sf object containing VRI-BEM

elevation_threshold

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

terrain_raster

SpatRaster that contains slope and aspect computed in radiants

Value

VRI-BEM augmented of the following variables : MEAN_ASP, MEAN_SLOPE, SLOPE_MOD and ABOVE_ELEV_THOLD.

Details

Aspect and slope are calculated by extracting the information from the elevation raster.

Based on whether the the elevation is above the selected threshold then ABOLVE_ELEV_THOLD is created with either "Y" or "N".

The SLOPE_MOD is then defined using the following logic:

  • k - cool aspect: if aspect is 285-359 or 0-134 AND slope is 25%-100% (except in CWH and MH zones, it's 35%-100%)

  • q - very steep cool aspect: if aspect is 285-359 or 0-134 AND slope > 100%

  • w - warm aspect: if aspect is 135-284 AND slope is 25%-100% (except in CWH and MH zones, it's 35%-100%)

  • z - very steep warm aspect: if aspect is 135-284 AND slope > 100%