hydromt_delft3dfm.workflows.process_branches#
- hydromt_delft3dfm.workflows.process_branches(branches: ~geopandas.geodataframe.GeoDataFrame, id_col: str = 'branchid', snap_offset: float = 0.01, allow_intersection_snapping: bool = True, smooth_branches: bool = False, logger=<Logger hydromt_delft3dfm.workflows.branches (WARNING)>)[source]#
Process the branches.
Process by cleaning up the branches, snapping them, splitting them and generating branchnodes.
- Parameters:
branches (gpd.GeoDataFrame) – The branches to process.
id_col (str, optional) – Defalt to branchid.
snap_offset (float, optional) – Maximum distance in meters between end points. If the distance is larger, they are not snapped. Defaults to 0.01.
allow_intersection_snapping (bool, optional) – Allow snapping at all branch ends, including intersections. Defaults to True.
smooth_branches (bool, optional) – whether to return branches that are smoothed (straightend), needed for pipes Default to False.
logger – The logger to log messages with.
- Returns:
branches (gpd.GeoDataFrame) – Preprocessed branches.
branches_nodes (gpd.GeoDataFrame) – Preprocessed branches’ nodes.