dodgr_to_sf | R Documentation |
dodgr
graph into an equivalent sf object.Works by aggregating edges into LINESTRING
objects representing longest
sequences between all junction nodes. The resultant objects will generally
contain more LINESTRING
objects than the original sf object, because
the former will be bisected at every junction point.
dodgr_to_sf(graph)
graph |
A |
Equivalent object of class sf.
Requires the sf package to be installed.
Other conversion:
dodgr_deduplicate_graph()
,
dodgr_to_igraph()
,
dodgr_to_sfc()
,
dodgr_to_tidygraph()
,
igraph_to_dodgr()
hw <- weight_streetnet (hampi)
nrow (hw) # 5,729 edges
xy <- dodgr_to_sf (hw)
dim (xy) # 764 edges; 14 attributes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.