(net)
return gdf_nodes
Generate point gdf from nodes.
    Helper for nx_to_gdf.
Generate point gdf from nodes.
    Helper for nx_to_gdf.
Generate point gdf from nodes . Helper for nx_to_gdf .
def _points_to_gdf(net):
    """
    Generate point gdf from nodes.
    Helper for nx_to_gdf.
    """
    node_xy, node_data = zip(*net.nodes(data=True))
    if isinstance(node_xy[0], int) and "x" in node_data[0].keys():
        geometry = [Point(data["x"], data["y"]) for data in node_data]  # osmnx graph
    else:
        geometry = [Point(*p) for p in node_xy]
    gdf_nodes = gpd.GeoDataFrame(list(node_data), geometry=geometry)
    if "crs" in net.graph.keys():
        gdf_nodes.crs = net.graph["crs"]
    return gdf_nodes
def _points_to_gdf ( net ) : node_xy , node_data = zip ( * net . nodes ( data = True ) ) if isinstance ( node_xy [ 0 ] , int ) and "x" in node_data [ 0 ] . keys ( ) : geometry = [ Point ( data [ "x" ] , data [ "y" ] ) for data in node_data ] # osmnx graph else : geometry = [ Point ( * p ) for p in node_xy ] gdf_nodes = gpd . GeoDataFrame ( list ( node_data ) , geometry = geometry ) if "crs" in net . graph . keys ( ) : gdf_nodes . crs = net . graph [ "crs" ] return gdf_nodes