pyrosm.graph_simplify.simplify_graph

Contents

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_edges must be the directed representation (two reciprocal rows per two-way street), e.g. the output of pyrosm.graphs.get_directed_edges – NOT the single-row OSM.get_network(nodes=True) edges. Returns (simplified_nodes, simplified_edges) in the same schema the exporters consume.