dfe8d88a87a4b98f831f69012e22f8b7611f7d25,osmnx/simplify.py,,consolidate_intersections_rebuild_graph,#Any#Any#Any#,408

Before Change


        
        if len(nodes_subset) > 1:
            for osmid in nodes_subset.index:
                neighbors = set(list(G.predecessors(osmid)) + list(G.successors(osmid)))
                neighbors_in_cluster = [n for n in nodes_subset.index if n in neighbors]
                if len(neighbors_in_cluster) == 0:
                    ndfc.append(osmid)

After Change


    for cluster_label, nodes_subset in groups:
        if len(nodes_subset) > 1:
            // identify all the (weakly connected) component in cluster
            wccs = list(nx.weakly_connected_components(G.subgraph(nodes_subset.index)))
            if len(wccs) > 1:
                // if there are multiple components in this cluster
                suffix = 0
                for wcc in wccs:
                    // set subcluster xy to the centroid of just these nodes
                    subcluster_centroid = node_points.loc[wcc].unary_union.centroid
                    gdf.loc[wcc, "x"] = subcluster_centroid.x
                    gdf.loc[wcc, "y"] = subcluster_centroid.y
                    // move to subcluster by appending suffix to nodes cluster label
                    gdf.loc[wcc, "cluster"] = "{}-{}".format(cluster_label, suffix)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: gboeing/osmnx
Commit Name: dfe8d88a87a4b98f831f69012e22f8b7611f7d25
Time: 2020-05-13
Author: boeing@usc.edu
File Name: osmnx/simplify.py
Class Name:
Method Name: consolidate_intersections_rebuild_graph


Project Name: gboeing/osmnx
Commit Name: f727d48d75e9c313855108bd7b759d1404c70ea1
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/folium.py
Class Name:
Method Name: plot_route_folium


Project Name: gboeing/osmnx
Commit Name: 56000b4ac3808e10ee064125978347375fecba8a
Time: 2020-11-18
Author: boeing@usc.edu
File Name: osmnx/folium.py
Class Name:
Method Name: plot_route_folium