hydromt_delft3dfm.workflows.set_branch_crosssections#

hydromt_delft3dfm.workflows.set_branch_crosssections(branches: GeoDataFrame, midpoint: bool = True)[source]#

Set regular cross-sections for each branch.

Only support rectangle, trapezoid (for rivers) and circle (for pipes).

Crosssections are derived at branches mid points if midpoints is True. Use this to setup crossections for rivers.

Crosssections are derived at up and downstream of branches if midpoints is False. Use this to setup crossections for pipes.

Else at both upstream and downstream extremities of branches if False.

Parameters:
  • branches (gpd.GeoDataFrame) –

    The branches. * Required variables: branchid, shape, shift, frictionid,

    frictiontype, frictionvalue

    • Optional variables:

      if shape = ‘circle’: ‘diameter’ if shape = ‘rectangle’: ‘width’, ‘height’, ‘closed’ if shape = ‘trapezoid’: ‘width’, ‘t_width’, ‘height’, ‘closed’

  • midpoint (bool, Optional) –

    Whether the crossection should be derived at midpoint of the branches. if midpoint = True:

    support ‘rectangle’ and ‘trapezoid’ shapes.

    if midpoint = True:

    support ‘circle’ shape.

    True by default.

Returns:

  • gpd.GeoDataFrame – The cross sections.

  • # FIXME (upstream and downstream crosssection)

  • type needs further improvement for channels