Combine(dissolve) adjacent reaches with no junctions

simplify_network(lines)

Arguments

lines

sf data.frame composed of LINESTRING objects

Examples

if (FALSE) {
data(nhd_sub_lines)
res <- simplify_network(nhd_sub_lines)

# single line returns the original
res <- simplify_network(nhd_sub_lines[1,])

}