hydromt_delft3dfm.workflows.links1d2d_add_links_2d_to_1d_embedded#
- hydromt_delft3dfm.workflows.links1d2d_add_links_2d_to_1d_embedded(mesh: UgridDataset, branchids: List[str] = None, within: Polygon | MultiPolygon = None) Dataset [source]#
Generate embedded links from 2d to 1d.
Links are generated where the 2d mesh intersects the 1d mesh: the ‘embedded’ links.
To find the intersecting cells in an efficient way, we follow we the next steps. 1) Get the maximum length of a face edge. 2) Buffer the branches with this length. 3) Find all face nodes within this buffered geometry. 4) Check for each of the corresponding faces if it crossed the branches.
- Parameters:
mesh (xu.UgridDataset) – Network in which the connections are made
branchids (List[str], optional) – List is branch id’s for which the connections are made. Defaults to None.
within (Union[Polygon, MultiPolygon], optional) – Clipping polygon for 2d mesh that is. Defaults to None.
- Returns:
link1d2d – Link1d2d Dataset.
- Return type:
xr.Dataset