hydromt_delft3dfm.graph_utils.gpd_to_digraph#

hydromt_delft3dfm.graph_utils.gpd_to_digraph(data: GeoDataFrame) <networkx.classes.digraph.DiGraph object at 0x7efc2b26cfb0>[source]#

Convert a gpd.GeoDataFrame to a nx.DiGraph.

This is done by taking the first and last coordinate in a row as source and target, respectively.

Parameters:

data (gpd.GeoDataFrame) – The data to convert.

Returns:

The converted directed graph.

Return type:

nx.DiGraph