iduedu.apply_urban_graph_changes

iduedu.apply_urban_graph_changes(graph_gdf, changes)[source]

Apply prepared changes to an UrbanGraph.

The function removes edges listed in changes.edges_to_delete, appends new nodes and edges, and returns a new graph. Any previously cached adjacency matrix is considered stale after applying structural changes; rebuild it before running routing or accessibility calculations.

Parameters:
Return type:

UrbanGraph

Returns:

New UrbanGraph with changes applied.

Raises:

ValueError – If graph and change topology flags differ or if edges_to_delete references edges that are absent from the graph.