Prep SRH-2D mesh, assigning groups and calculating areas

vector_prep_mesh(
  mesh,
  group_polygons = NULL,
  mask_polygons = NULL,
  .group_var = comid,
  .id_var = vid
)

Arguments

mesh

An sf polygon feature collection with one polygon for each vertex (computation point) identified by a vid attribute. These may be Voronoi (aka Thiessen) polygons generated based on vertex points in a tool such as sf (st_voronoi), QGIS (Voronoi Polygons), or ArcGIS (Create Thiessen Polygons).

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 collection defining areas to be masked out of the HSI calculation. These areas will still be included in the total inundated area.

.group_var

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

.id_var

The unquoted name of the attribute used to identify vertices in the mesh layer. Defaults to vid

Value

A tbl_df with one row per vertex (computation point), including the vertex id (e.g. vid), the associated group id (e.g. comid), and the area of the polygon in square feet.