| ox_simplify | R Documentation |
Removes interstitial (degree-2) nodes that merely shape the geometry of a
street, merging each maximal chain of such nodes into a single edge whose
geometry follows the original points and whose length is the sum of the
merged segments. Only true endpoints and intersections are kept as nodes.
ox_simplify(g)
g |
An unsimplified osm_graph. |
The topology walk is performed by the Rust core; geometry is rebuilt with
sf. Downloaded graphs are unsimplified by default; this is the standard
cleanup step before analysis.
A simplified osm_graph (with meta$simplified = TRUE).
g <- example_osm_graph()
ox_simplify(g) # already simplified: returned unchanged
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.