Calculate HSI based on HEC-RAS 2D rasters

raster_summarize_hsi(
  rasters,
  group_polygons = NULL,
  mask_polygons = NULL,
  mask_raster = NULL,
  hsi_func = raster_dvhsi_hqt,
  .group_var = comid,
  parallel = FALSE
)

Arguments

rasters

A named list or SpatRasterDataset of depth and velocity raster stacks (in terra format) containing model results for each flow, as output by raster_prep_grid()

group_polygons

An sf polygon feature collection with one polygon for each analysis reach. These may have been delineated previously by splitting the hydraulic model domain into subsections.

mask_polygons

Optional: An sf polygon feature or feature collection containing a mask to be eliminated from the study area; for example, a baseflow channel. Only works if group polygons are also supplied.

mask_raster

Optional: A terra raster of 1 or 0 to be multipled for the purpose of masking out a baseflow channel.

hsi_func

A terra::lapp-compatible function that takes depth (ft) and velocity (ft/s) raster layers and returns habitat suitability index values between 0 and 1. Function arguments should be d and v in US units. Defaults to the raster_dvhsi_hqt function in this package.

.group_var

The unquoted name of the attribute used to identify groups in the group_polygons layer. Defaults to comid

parallel

Toggles parallel processing. Currently under development, keep FALSE for now.

Value

A tbl_df data frame with one row per group (comid) per flow (flow_cfs), containing the total inundated area (area_tot) in square feet, the suitable habitat area (area_wua) in square feet, and the ratio of suitable to total area (area_pct).