flatten_network | R Documentation |
All crossing edges are identified, and the points of intersections are
injected within the edge geometries. Note that the injected points are
not converted to network nodes (this can be achieved via sfnetworks'
sfnetworks::to_spatial_subdivision()
, which is part of the tasks
that are included in clean_network()
.
flatten_network(network)
network |
A network object |
The functionality is similar to sfnetworks'
sfnetworks::st_network_blend()
, but in that case an external point is
only injected to the closest edge.
A network object with additional points at intersections
bucharest_osm <- get_osm_example_data()
edges <- dplyr::bind_rows(bucharest_osm$streets,
bucharest_osm$railways)
network <- sfnetworks::as_sfnetwork(edges, directed = FALSE)
flatten_network(network)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.