
Points on the FWA network downstream of a regulating dam
Source:R/link_regulated.R
knw_link_regulated.Rdscripts/0294's regulated-reach test. A CABD dam with a reservoir, or a
degree of regulation of regulation_min percent or more, is placed on the
nearest main-flow FWA segment within dam_snap_m; a point is regulated when
such a dam lies upstream of it (fwa_downstream() with the roles swapped).
wet's flow is natural flow, so on a regulated river it is not the flow the
fish meet.
Arguments
- conn
a
DBIconnection to a database holdingcabdandwhse_basemapping.- pts
data.framewithblue_line_key,downstream_route_measure,wscodeandlocalcode(ltree text, asknw_link_flow()returns them).- dam_snap_m
numeric(1)how far a dam may sit from the segment it is placed on.- regulation_min
numeric(1)percent degree of regulation at or above which a dam without a reservoir counts.
Value
A list: regulated, a tibble of the distinct pts keys with a
logical regulated; dams, the dams placed (cabd_id, dam_name_en,
degree_of_regulation_pc, reservoir_present, position, snap_m).
Examples
if (FALSE) { # \dontrun{
conn <- DBI::dbConnect(RPostgres::Postgres())
f <- knw_link_flow(conn, 701747495)
knw_link_regulated(conn, data.frame(blue_line_key = 360886335, downstream_route_measure = 100,
wscode = f$wscode, localcode = f$localcode))
} # }