cityImage.fix_network_topology#

cityImage.fix_network_topology(nodes_gdf, edges_gdf)[source]#

Node the network at shared, un-noded vertices.

An edge is split at one of its own internal vertices only when that vertex coincides with a vertex (endpoint or internal) of another edge: two edges genuinely meet there but the junction was never noded. Crossings that do not share a vertex are left intact — this covers grade-separated bridges/tunnels and ways that merely cross in 2D, which must not be noded, as well as an edge whose vertex happens to fall on another edge’s interior (the split would only be undone by the pseudo-node simplification anyway). No new vertices are ever introduced.

Parameters:
  • nodes_gdf (Point GeoDataFrame) – The nodes (junctions) GeoDataFrame.

  • edges_gdf (LineString GeoDataFrame) – The street segments GeoDataFrame.

Returns:

nodes_gdf, edges_gdf – The (possibly unchanged) nodes and the updated edges.

Return type:

tuple of GeoDataFrames