sf2igraph.Rd
Convert sf lines to an igraph object
sf2igraph(sf_lines, tolerance = 1)
sf lines object
numeric snapping distance for lines to be considered connected
tree <- create_reversed_tree(15)
tree_sf <- igraph2sf(tree)
tree <- sf2igraph(tree_sf, tolerance = 1)
if (FALSE) {
data(nhd_sub)
tree <- sf2igraph(nhd_sub)
plot(tree$tree,
edge.width = tree$weights,
layout = igraph::layout_as_tree(tree$tree, mode = "in"))
}