View source: R/enforce_dendritic.R
enforce_dendritic | R Documentation |
This function provides an interface to tools which can correct non-dendritic geometries in a river network. This tool can correct divergent rivers and complex confluences.
enforce_dendritic(rivers, correct = FALSE)
rivers |
A |
correct |
A logical value, when |
Divergent rivers are parts of a river network where a single tributary splits into two after a confluence. In a dendritic network small upstream rivers can only combine at confluences into a single river.
Complex confluences occur when confluences have over 2 input tributaries. In a dendritic network two tributaries only must combine into one at confluences.
If errors are being corrected manually, all divergent pairs must be reduced to only one river and complex confluences modified such that only 2 rivers join together. When corrections are done automatically the shorted divergent stream is kept.
If correct
is FALSE
, a sf
object with non-dendritic topology indicated in columns "divergent" and "complex". These error columns indicate for each river line if that river is part of a divergent pair or complex confluence. The columns are populated by integers which indicate with which river they share a topological error. If correct
is TRUE
, a rivers
object with automatic topological corrections applied is returned.
## Not run:
enforce_dendritic(rivers = sf_line_object)
enforce_dendritic(rivers = sf_line_object, correct = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.