9aef0f280be9dbb22ac407d8478376beac8f955a,osmnx/pois.py,,parse_osm_relations,#Any#Any#,208

Before Change


            osm_way_df = osm_way_df.drop(member_way_ids)
        elif relation["type"] == "multiline":
            print("TODO: multiline relation")
        elif relation["type"] == "multipoint":
            print("TODO: multipoint relation")

    // Merge "osm_way_df" and the "gdf_relations"

After Change


                except Exception:
                    multipoly = invalid_multipoly_handler(gdf=member_ways, relation=relation, way_ids=member_way_ids)

                if multipoly:
                    // Create GeoDataFrame with the tags and the MultiPolygon and its "ways" (ids), and the "nodes" of those ways
                    geo = gpd.GeoDataFrame(relation["tags"], index=[relation["id"]])
                    // Initialize columns (needed for .loc inserts)
                    geo = geo.assign(geometry=None, ways=None, nodes=None, element_type=None, osmid=None)
                    // Add attributes
                    geo.loc[relation["id"], "geometry"] = multipoly
                    geo.loc[relation["id"], "ways"] = member_way_ids
                    geo.loc[relation["id"], "nodes"] = member_nodes
                    geo.loc[relation["id"], "element_type"] = "relation"
                    geo.loc[relation["id"], "osmid"] = relation["id"]

                    // Append to relation GeoDataFrame
                    gdf_relations = gdf_relations.append(geo)
                    // Remove such "ways" from "osm_way_df" that are part of the "relation"
                    osm_way_df = osm_way_df.drop(member_way_ids)
            except Exception:
                log("Could not handle OSM "relation": {}".format(relation["id"]))

    // Merge "osm_way_df" and the "gdf_relations"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: gboeing/osmnx
Commit Name: 9aef0f280be9dbb22ac407d8478376beac8f955a
Time: 2018-05-03
Author: henrikki.tenkanen@helsinki.fi
File Name: osmnx/pois.py
Class Name:
Method Name: parse_osm_relations


Project Name: gboeing/osmnx
Commit Name: 2199c616c262de892462c94517cb911facf1eeed
Time: 2017-12-28
Author: henrikki.tenkanen@helsinki.fi
File Name: osmnx/pois.py
Class Name:
Method Name: parse_osm_relations


Project Name: p2irc/deepplantphenomics
Commit Name: 5d6e2e8a312703a1f97ccc249cb2b4b41d5806c1
Time: 2018-02-01
Author: jubbens@gmail.com
File Name: deepplantphenomics/layers.py
Class Name: batchNormLayer
Method Name: forward_pass