<br>
In the <u>[[#Convert_XPSWMM_Model_to_Recommended_TUFLOW_Structure | Convert XPSWMM Model to Recommended TUFLOW Structure]]</u> section, the XPSWMM 1D/2D connections were converted into TUFLOW format. ThisHowever, since we have included and edited the SWMM data (HDR, inlet curves, and inlet usage GeoPackages), this connections layer needs to be updated. We need to workchange forthe TUFLOWupstream SWMM.SX connections to HX connections, create new upstream CN lines, and ensure that the connections are snapped to the pipe network.
<ol>
<li> In the QGIS Layers panel, within the TBC group, select (left click) the 2d_bc lines layer (i.e. '''1D2D_Urban_001_2d_bc_L''') and toggle on editing. This layer contains the converted XPSWMM 1D/2D connections.
<li> In the Processing Toolbox, select the 'Edit Features In-Place' tool [[File:edit_features_in_place_icon.png]]. This allows the editing of an existing layer, instead of the creation of a new layer.
<li> Go to 'Vector geometry' in the processing tool list and select 'Snap geometries to layer'. This opens the dialog shown below.
:* Reference Layer: '''Links--Conduits'''. This is the layer we want the 2d_bc connections layer to snap to.
:* Tolerance: '0.1 meters'
:* Behavior: 'Snap end points to end points only'
<li> Click ' RunModify All Features'. Once the tool is finished, click 'Close'. ▼
<li> This tool has ensured that the connections layer is snapped to the pipe network.
{{Video|name= Animation_XPtoTUFLOW_1D_model_07a.mp4|width=1350}} ▼
<li> In the top dropdown menu options, select View > Toolbars. Tick on 'Snapping Toolbar'.
<li> Select the 'Enable Snapping' [[File: snapping_icon.png]] and 'All Layers > Advanced Configuration', an eye icon appears.
<br><br>
<li> Select the 'Edit Advanced Configuration' [[File: Advanced_config_icon.png | 30px]] and tick on the 2d_bc lines layer and the '''Links--Conduits''' layer.
<li> From the 'Digitizing Toolbar', use the 'Add Line Feature' tool andto thecreate 'Vertexa Tool'CN toline edit theto 2d_bceach linesupstream layerconnection.
<li> Use the 'Identify Features' [[File: identify_features_icon.png | 30px]] tool to select an upstream 'SX' connection. A dialog will open.
<li> The video below demonstrates this process.
<li> Change the 'Type' field, to '''HX'''.
<li> Repeat this for each upstream 'SX' connection.
<li> Toggle editing off editing for '''2d_bc_SWMM_Culvert_Connections_001_L'''the 2d_bc connections layer to save the edits. ▼
<br><br>
{{Video|name=|width=1350}}
</ol>
<ol>
<li> In the QGIS Layers panel, select (left click) '''Links--Conduits'''.
<li> Use the 'Select Features' tool to select the culvert and pipe objects that will have a clear opening in '''Links--Conduits''' (hold Shift to select multiple). Typically, these culvert and pipe objects are located under an embankment or connect to/from a waterway, such as a creek. In XPSWMM, this type of feature is typically represented by '''Links''' snapped to '''Nodes''' with 'Link invert to 2D' selected.
<li> In the Processing Toolbox, go to TUFLOW >> SWMM and select '<u>[[QGIS_SWMM_BC_Create_Channel_Endpoint_1D/2D_Connections |BC - Create channel endpoint 1D/2D connections]]</u>'. This opens the dialog shown below.
:* Input Conduits Layer: '''Links--Conduits''' (this is prepopulated as '''Links--Conduits''' is the active dataset).
:* Tick on 'Selected features only'.
:* Create connections at: 'Both ends'.
:* Offset Distance: This value is the distance from the channel endpoint to the midpoint of the BC line. The recommended value is 2.
:* Length of BC lines: This value should be similar the width of the channel.
:* Tick on 'Set 2D cell elevation to 1D culvert invert at 1D/2D connection cells if needed'.
:* Output Layer:
<ol>
::<li> Click the ... and select 'Save to GeoPackage'.
::<li> Navigate to the '''TUFLOW\model\gis''' folder and select the GPKG created from the XPSWMM model in the <u>[[#Convert_XPSWMM_Model_to_Recommended_TUFLOW_Structure | Convert XPSWMM Model to Recommended TUFLOW Structure]]</u> section. This GPKG will have the same name as the original XPSWMM model.
::<li> Click 'Save'. A dialog will open. In the 'Layer Name' field, write an appropriate layer name. It is recommended to name the output layer with the prefix '2d_bc' so TUFLOW styles can be automatically applied. For example, '''2d_bc_Culvert_Connections_001_L'''.
::<li> Click 'OK'.
</ol>
▲<li> Click 'Run'. Once the tool is finished, click 'Close'.
<li> The 2d_bc layer will appear in the QGIS Layers panel. Select (left click) the 2d_bc layer and click 'Apply TUFLOW Styles to Current Layer'. Toggle on editing.
<li> Review the '''2d_bc_SWMM_Culvert_Connections_001_L''' data. Make corrections by deleting objects located where a 1D/2D connection was required only at one end of the conduit, rather than at both ends.
▲<li> Toggle editing off for '''2d_bc_SWMM_Culvert_Connections_001_L''' to save the edits.
▲{{Video|name=Animation_XPtoTUFLOW_1D_model_07a.mp4|width=1350}}
<br>
</ol>
|