Removes redundant (straight-line) vertices from graph, leaving only junction vertices.
dodgr_contract_graph(graph, verts = NULL)
A flat table of graph edges. Must contain columns labelled
Optional list of vertices to be retained as routing points.
These must match the
A list of two items:
graph containing contracted version of
graph, converted to a standardised format, and
edge_map, a two-column matrix mapping all newly contracted edges onto
corresponding edges in original (uncontracted) graph.
#>  5845graph <- dodgr_contract_graph (graph) nrow (graph$graph) # 764#>  786