271bfb2659b8c19a142d1791ec5671713419ef6f,osmnx/simplification.py,,_merge_nodes_geometric,#Any#Any#Any#,401

Before Change



        // buffer nodes by tolerance then generate n-sized chunks of nodes
        n = int(len(G) ** 0.5)
        chunks = get_chunks(gs_nodes.loc[idx].buffer(tolerance), n)

        // unary_union each chunk then unary_union those unary unions
        merged_nodes = gpd.GeoSeries(chunk.unary_union for chunk in chunks).unary_union

After Change


        // finally, unary_union each chunk then unary_union those unary unions
        n = int(len(gs_nodes) ** 0.5)
        idx = pd.DataFrame((gs_nodes.x, gs_nodes.y)).T.sort_values([0, 1]).index
        buffers = gs_nodes.loc[idx].buffer(tolerance)
        chunks = (buffers.iloc[i : i + n] for i in range(0, len(buffers), n))
        merged_nodes = gpd.GeoSeries(chunk.unary_union for chunk in chunks).unary_union

    // if only a single node results, make it iterable to convert to GeoSeries
    if isinstance(merged_nodes, Polygon):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: gboeing/osmnx
Commit Name: 271bfb2659b8c19a142d1791ec5671713419ef6f
Time: 2021-03-23
Author: boeing@usc.edu
File Name: osmnx/simplification.py
Class Name:
Method Name: _merge_nodes_geometric


Project Name: gboeing/osmnx
Commit Name: 8ba8e111270d028b30ef00dfdf82930f916cd987
Time: 2021-03-25
Author: boeing@usc.edu
File Name: osmnx/simplification.py
Class Name:
Method Name: _merge_nodes_geometric


Project Name: gboeing/osmnx
Commit Name: 3639aa0952e23cbf0610862728f38699dd6f3c31
Time: 2021-03-14
Author: boeing@usc.edu
File Name: osmnx/simplification.py
Class Name:
Method Name: _merge_nodes_geometric