(net, points, lines, spatial_weights, nodeID)
return gdf_edges
Generate gdf(s) from primal network.
    Helper for nx_to_gdf.
Generate gdf(s) from primal network.
    Helper for nx_to_gdf.
Generate gdf ( s ) from primal network . Helper for nx_to_gdf .
def _primal_to_gdf(net, points, lines, spatial_weights, nodeID):
    """
    Generate gdf(s) from primal network.
    Helper for nx_to_gdf.
    """
    if points is True:
        gdf_nodes = _points_to_gdf(net)

        if spatial_weights is True:
            W = libpysal.weights.W.from_networkx(net)
            W.transform = "b"

    if lines is True:
        gdf_edges = _lines_to_gdf(net, points, nodeID)

    if points is True and lines is True:
        if spatial_weights is True:
            return gdf_nodes, gdf_edges, W
        return gdf_nodes, gdf_edges
    if points is True and lines is False:
        if spatial_weights is True:
            return gdf_nodes, W
        return gdf_nodes
    return gdf_edges
def _primal_to_gdf ( net , points , lines , spatial_weights , nodeID ) : if points is True : gdf_nodes = _points_to_gdf ( net ) if spatial_weights is True : W = libpysal . weights . W . from_networkx ( net ) W . transform = "b" if lines is True : gdf_edges = _lines_to_gdf ( net , points , nodeID ) if points is True and lines is True : if spatial_weights is True : return gdf_nodes , gdf_edges , W return gdf_nodes , gdf_edges if points is True and lines is False : if spatial_weights is True : return gdf_nodes , W return gdf_nodes return gdf_edges