dodgr_contract_graph | R Documentation |
Removes redundant (straight-line) vertices from graph, leaving only junction vertices.
dodgr_contract_graph(graph, verts = NULL, nocache = FALSE)
graph |
A flat table of graph edges. Must contain columns labelled
|
verts |
Optional list of vertices to be retained as routing points.
These must match the |
nocache |
If |
A contracted version of the original graph
, containing the same
number of columns, but with each row representing an edge between two
junction vertices (or between the submitted verts
, which may or may not be
junctions).
Other modification:
dodgr_components()
,
dodgr_uncontract_graph()
graph <- weight_streetnet (hampi)
nrow (graph) # 5,973
graph <- dodgr_contract_graph (graph)
nrow (graph) # 662
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.