| as_network | R Documentation |
Create a network from a collection of line strings
as_network(edges, flatten = TRUE, clean = TRUE)
edges |
An |
flatten |
Whether all intersections between edges should be converted to nodes |
clean |
Whether general cleaning tasks should be run on the generated
network (see |
An sfnetworks::sfnetwork object
edges <- sf::st_sfc(
sf::st_linestring(matrix(c(0, 0, 1, 1), ncol = 2, byrow = TRUE)),
sf::st_linestring(matrix(c(0, 1, 1, 0), ncol = 2, byrow = TRUE)),
crs = sf::st_crs("EPSG:32635")
)
# Run with default values
as_network(edges)
# Only build the spatial network
as_network(edges, flatten = FALSE, clean = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.