pyrosm.graph_simplify.simplify_graph#
- pyrosm.graph_simplify.simplify_graph(nodes, directed_edges, *, from_id_col='u', to_id_col='v', node_id_col='id', length_cols=('length',), edge_attrs_differ=None, node_attrs_include=None, remove_rings=True, track_merged=False)#
Simplify pyrosm’s directed graph-export edges (see module docstring).
directed_edgesmust be the directed representation (two reciprocal rows per two-way street), e.g. the output ofpyrosm.graphs.get_directed_edges– NOT the single-rowOSM.get_network(nodes=True)edges. Returns(simplified_nodes, simplified_edges)in the same schema the exporters consume.