(net, points, nodeID)
return gdf_edges
Generate linestring gdf from edges.
    Helper for nx_to_gdf.
Generate linestring gdf from edges.
    Helper for nx_to_gdf.
Generate linestring gdf from edges . Helper for nx_to_gdf .
def _lines_to_gdf(net, points, nodeID):
    """
    Generate linestring gdf from edges.
    Helper for nx_to_gdf.
    """
    starts, ends, edge_data = zip(*net.edges(data=True))
    gdf_edges = gpd.GeoDataFrame(list(edge_data))

    if points is True:
        node_start = []
        node_end = []
        for s in starts:
            node_start.append(net.nodes[s][nodeID])
        for e in ends:
            node_end.append(net.nodes[e][nodeID])
        gdf_edges["node_start"] = node_start
        gdf_edges["node_end"] = node_end

    if "crs" in net.graph.keys():
        gdf_edges.crs = net.graph["crs"]

    return gdf_edges
def _lines_to_gdf ( net , points , nodeID ) : starts , ends , edge_data = zip ( * net . edges ( data = True ) ) gdf_edges = gpd . GeoDataFrame ( list ( edge_data ) ) if points is True : node_start = [ ] node_end = [ ] for s in starts : node_start . append ( net . nodes [ s ] [ nodeID ] ) for e in ends : node_end . append ( net . nodes [ e ] [ nodeID ] ) gdf_edges [ "node_start" ] = node_start gdf_edges [ "node_end" ] = node_end if "crs" in net . graph . keys ( ) : gdf_edges . crs = net . graph [ "crs" ] return gdf_edges