hydromt_delft3dfm.DFlowFMModel.setup_bridges#
- DFlowFMModel.setup_bridges(bridges_fn: str | None = None, bridges_defaults_fn: str | None = '1D_bridges_defaults', bridge_filter: str | None = None, snap_offset: float | None = None)[source]#
Prepare bridges, including bridge locations and bridge crossections.
The bridges are read from
bridges_fn
and if any missing, filled with information provided inbridges_defaults_fn
.When reading
bridges_fn
, only locations within the region will be read. Read locations are then filtered for value specified inbridge_filter
on the column “structure_type”. Remaining locations are snapped to the existing network within a max distance defined insnap_offset
and will be dropped if not snapped.A default rectangle bridge profile can be found in
bridges_defaults_fn
as an example.Structure attributes [‘structure_id’, ‘structure_type’] are either taken from data or generated in the script. Structure attributes [‘shape’, ‘diameter’, ‘width’, ‘t_width’, ‘height’, ‘closed’, ‘shift’, ‘length’, ‘pillarwidth’, ‘formfactor’, ‘friction_type’, ‘friction_value’, ‘allowedflowdir’, ‘inletlosscoeff’, ‘outletlosscoeff’] are either taken from data, or in case of missing read from defaults.
Adds/Updates model layers:
bridges geom: 1D bridges vector
- Parameters:
bridges_fn (str Path, optional) –
Path or data source name for bridges, see data/data_sources.yml. Note only the points that are within the region polygon will be used.
Optional variables: [‘structure_id’, ‘structure_type’, ‘shape’,
’diameter’, ‘width’, ‘t_width’, ‘height’, ‘closed’, ‘shift’, ‘length’, ‘pillarwidth’, ‘formfactor’, ‘friction_type’, ‘friction_value’, ‘allowedflowdir’, ‘inletlosscoeff’, ‘outletlosscoeff’]
bridges_defaults_fn (str Path, optional) –
Path to a csv file containing all defaults values per “structure_type”. By default hydrolib.hydromt_delft3dfm.data.bridges.bridges_defaults.csv is used. This file describes a minimum rectangle bridge profile.
- Allowed variables: [‘structure_type’, ‘shape’, ‘diameter’, ‘width’,
’t_width’, ‘height’, ‘closed’, ‘shift’, ‘length’, ‘pillarwidth’, ‘formfactor’, ‘friction_type’, ‘friction_value’, ‘allowedflowdir’, ‘inletlosscoeff’, ‘outletlosscoeff’]
river_filter (str, optional) – Keyword in “structure_type” column of
bridges_fn
used to filter bridge features. If None all features are used (default).snap_offset (float, optional) – Snapping tolenrance to automatically snap bridges to network and add [‘branchid’, ‘chainage’] attributes. By default None. In this case, global variable “network_snap_offset” will be used.
See also