river_net {dci} | R Documentation |
Create a river_net
Object
Description
Constructs a river_net object, a geospatial network structure built on top
of the sfnetworks::sfnetwork()
class. This object integrates river lines,
barriers and outlets allowing for connectivity analyses with
calculate_dci()
or other network tools.
Usage
river_net(
rivers,
barriers,
outlet,
check = TRUE,
tolerance = NULL,
max_iter = 10
)
Arguments
rivers |
A |
barriers |
A |
outlet |
An |
check |
Logical. If |
tolerance |
A numeric value specifying the snapping distance
(in map units) to align points to the river network. Defaults to |
max_iter |
An integer indicating the maximum number of correction iterations to run. As some topological errors are corrected new ones can can arise requiring multiple passes. In some cases, an automated correction choice can lead to a recursive correction that eliminates most rivers. In this case, some manual corrections may help avoid this. |
Value
An object of class river_net representing the river network formed from the provided spatial inputs.
Examples
riv_in <- import_rivers(yamaska_rivers, quiet = TRUE)
bar_in <- import_points(yamaska_barriers, type = "bars")
out_in <- import_points(yamaska_outlet, type = "out")
# For large river networks it may be better to specify a smaller number of
# correction sweeps.
yam_net <- river_net(rivers = riv_in, barriers = bar_in,
outlet = out_in, max_iter = 3)