import_rivers: Prepare rivers for connectivity analyses
Description
Reads and prepares geospatial river line data for use in river_net().
Only the largest fully connected component of the network is retained;
river lines that are part of disconnected secondary networks are discarded.
Usage
import_rivers(rivers, quiet = FALSE)
Value
An object of class rivers, suitable for use with enforce_dendritic()
or as input to river_net().
Arguments
rivers
A character string specifying the path to a shapefile of river lines,
or an sf object representing river geometries.
quiet
Logical. If FALSE (default), plots the imported river lines in
black over the original lines in red so that removed rivers are highlighted.
rivers_in <- import_rivers(yamaska_rivers)
# This can also be done quietly to omit plotting river lines after importingrivers_in <- import_rivers(yamaska_rivers, quiet = TRUE)