Construct aggregated divides from Stage-1 rec_div via rec_id_list
Source:R/aggregate_network_and_divides.R
construct_agg_divides.RdGiven the network table from aggregate_network() (which carries
flowpath_id -> rec_id_list) and the Stage-1 rec_div polygons, unions
the rec_div members for each aggregated flowpath.
No raster, no snapping, no mapshaper. Stage-3 fill_small_holes and
clean_gpkg_layer handle any residual topology.
Arguments
- network
Network
data.framefromaggregate_network()withflowpath_idandrec_id_list.- rec_div
Stage-1 reconciled divide
sfwithflowpath_id(= rec_id).- flowpaths
Aggregated flowpath
sffromaggregate_network().
Examples
if (FALSE) { # \dontrun{
agg <- aggregate_network(flowpath = s1_fp, divide = rec_div, pois = pois)
rec_div <- sf::st_read("rec_div.gpkg", "divides")
divides <- construct_agg_divides(network = agg$network,
rec_div = rec_div,
flowpaths = agg$flowpaths)
} # }