How to edit a TIN
    • 12 Aug 2022
    • 8 Minutes to read

    How to edit a TIN


    Article summary

    Once you have Created a new TIN, several options for editing, manipulation and merging are available.

    TIN files generated in Flood Modeller, as part of the 1D flood mapping process, will often require some post-processing to produce a file that fully represents your 1D model structure. The nature of the post-processing will depend on the TIN creation process adopted:

    • Files generated in TIN Creator will often have too many triangles as the Delaunay triangulation method will link all possible points rather than just adjacent cross-sections. You should delete surplus triangles, ie those joining non-adjacent cross-sections, before using the TIN to create a flood map.
    • Files generated in Flood Modeller will always only link adjacent cross-sections. This is done on a reach-by-reach basis, governed by the ‘Distance to Next’ chainage value. If this value is 0m, the current section of triangulation will stop and a new section will start on the next set of linked cross-sections in your model file. Consequently, the resultant TIN file will have some gaps between reaches. You must then use the TIN editing tools to either add new points and triangles or to move existing ones to eliminate all gaps in your water surface.

    Both methods for editing TIN are described in this section.

    Removing triangles in TIN Creator

    The following procedure enables you to select and delete unwanted triangles from a TIN loaded into TIN Creator:

    1. Select a single triangle - to select a single triangle, hold the left 'Ctrl' key and click the left mouse button on the appropriate triangle. The selected triangle will show highlighted in light blue. To unselect a triangle, repeat the same procedure.
    2. Expand selection to a group of triangles - to select a group of triangles hold the left 'Shift' key and hold down the left mouse button whilst dragging the mouse through the appropriate triangles. All selected triangles are highlighted in light blue, as shown in the example below. Note, selected triangles must be unselected one at a time; hold the left 'Shift' key and click the left mouse button on a selected triangle to unselect it.
    3. Deleting triangles - selected triangles (shown highlighted in light blue) can be deleted by pressing the 'Delete' button on the keyboard.

    TINCreatorassetsimagesremovetriangles.png

    Useful Tip: The action of deleting a triangle (or triangles) or moving a TIN point can be undone by clicking the 'Undo' button in the TIN Creator toolbar (there is also an adjacent 'Redo' button). It is possible to reverse a sequence of actions up to 10 times or until the last time the TIN file was saved. You cannot undo actions after a TIN has been saved.

    Removing triangles in the Flood Modeller TIN Editor

    You can edit a TIN loaded into your Flood Modeller map view directly using the following procedure:

    1. Right-click on your TIN in the 'Layers' panel and select 'Start Edit' from the displayed menu
    2. The 'Layer Editor' is displayed above the map view. The select button in the 'Layer Editor' tab allows you to select TIN triangles by either dragging a line across a triangle or dragging a rectangle over a triangle. Selected triangles will appear yellow in your map.
    3. Remove highlighted triangles by clicking the 'Delete' button in the 'Layer Editor'.
    4. Select 'Save' or 'Save As' from the 'Layer Editor' tab. Alternatively, select 'Stop Edit' and you will be prompted to save any unsaved changes.

    Adding/moving triangles in the Flood Modeller TIN Editor

    You can edit a TIN loaded into your Flood Modeller map view directly using the following procedure:

    1. Right-click on your TIN in the 'Layers' panel and select 'Start Edit' from the displayed menu.
    2. The TIN Layer Editor is displayed above the map view.
    3. Tools provided in the 'Layer Editor' tab are:
    • Triangle – after activating the tool, the mouse cursor will change to a pencil icon and each left-click on the map will add a new point of a new triangle. Every third click will complete a triangle (and a subsequent click will start a new triangle). The snapping control will automatically be set to snap to your TIN file, but additional snapping to other layers can be activated in the snapping control accessed via the 'Layer Editor' tab. Also, clicking on the map at a distance from an existing point will create a new point in the current triangle. Clicking the 'Select' button will turn off the drawing tool (click 'Accept' to complete your drawing). The 'Undo' button will be activated, giving you the option to reverse your drawing actions.
    • Delete vertex – a TIN point can be removed by clicking the 'Delete Vertex' button in the toolbar. The mouse cursor will change to the 'Delete' icon. Clicking close to a TIN point will remove it from the map together with all connected triangles. Click the 'Select' button to turn off the delete function. This will activate the 'Undo' button, giving you the option to undo your delete actions.
    • Move vertex - a TIN point can be moved by clicking the 'Move Vertex' button in the toolbar. The mouse cursor will change to the 'Move' icon (only when close to a TIN point). If you depress the mouse button close to a TIN point, you can drag it to a new location. Note, some locations are not permitted as they would make the TIN structure invalid (eg crossing other TIN vertices). Click the 'Select' button to turn off the 'Move' function. This will activate the 'Undo' button, giving you the option to undo your actions.

    iv. Select 'Save' or 'Save As' from the 'Layer Editor' tab. Alternatively, select 'Stop Edit' and you will be prompted to save any unsaved changes.

    Additional manipulation options

    • Selecting and moving a point - To select a point move the mouse cursor over the point in question. The point should then change red, indicating that it has been selected. To move a selected point press and hold the left 'Ctrl' button whilst dragging the point with the right mouse button. The point can only be moved within the boundaries of the existing triangles which it forms a corner of.
    • Selecting a triangle - To select a single triangle hold the left 'Ctrl' key and click the left mouse button on the appropriate triangle. The selected triangle will show highlighted in light blue, as shown in figure below. To unselect a triangle repeat the same procedure.
    • Selecting a group of triangles - To select a group of triangles hold the left 'Shift' key and hold down the left mouse button whilst dragging the mouse through the appropriate triangles. All selected triangles will show highlighted in light blue, as shown in Figure 1 below. To unselect a triangle hold the left 'Shift' key and click the left mouse button on the appropriate triangle.
    • Deleting triangles - Selected triangles (shown highlighted in light blue) can be deleted by pressing the delete button on the keyboard, as shown below.
      TINCreatorassetsimagesdeleteTIN1.jpg
      TINCreatorassetsimagesdeleteTIN2.jpg
    • Undoing Actions - The action of deleting a triangle (or triangles) or moving of a TIN point can be undone by clicking the undo button in the toolbar (there is also an adjacent redo button). It is possible to undo a sequence of actions up to a total of ten or until the last time the TIN file was saved. Actions cannot be undone after a TIN has been saved.

    How to Merge TINs

    Flood Modeller allows you to merge several TINs (Triangular Irregular Networks) into one by following these steps:

    1. Load two or more TIN files into Flood Modeller.

    TINCreatorassetsimagesmerge1.jpg

    2. In the Modelling Toolbox, select 'Flood Mapping/1D Models/Merge TINs'. The current TIN files are listed in a new window.

    3. Select the TINs you would like to merge, click 'OK' and provide the name (and location) for the output file ie new merged TIN. Click 'OK' and the new combined TIN file will be created.

    TINCreatorassetsimagesmerge2.jpg

    4. In some cases the combined TIN may contain gaps, as highlighted by the zoomed-in section of a combined TIN shown below. This is due to alignment of the two input TIN files at the point where they are joined.

    TINCreatorassetsimagesmerge3.png

    In this case, you may need to use the TIN editing tool to add additional triangles manually to your TIN file. To edit, right-click on the combined TIN in the 'Layers' panel and select 'Start Edit' from the displayed menu. This will activate the TIN editor toolbar above the map in the main toolbar.

    5. In the 'Layer editor' tab select 'Snapping' button. The snapping window is displayed in the map view. You should activate snapping to your combined TIN (so new triangles link exactly to existing TIN points) plus any other layers that will help you locate new triangles correctly (in this example, the 1D model node points layer provides one point of the triangle being added).

    6. Activate the drawing tool (by clicking the 'Triangle' button, so the mouse pointer changes to a pencil icon).

    7. To start drawing, click on one point of the triangle you want to add. Then click on the second point and double-click on the last point (to end drawing that triangle). Repeat this process for all triangles you are adding and then click 'Accept' in the editor toolbar.

    8. Any new points created when you drew your additional triangles will have no 1D node references. You can add these by clicking on the 'Attribute Window' button in the 'Layer editor' tab. Alternatively, right-click on the TIN file in the 'Layers' panel and select 'Show attributes' from the displayed menu. A new window will list all TIN points and associated attributes. New points will have no 1D node label, as shown in the example below:

    TINCreatorassetsimagesmerge4.png

    9. Enter a valid 1D model node reference in the blank 'Node Label A' field and close the attribute editor window.

    10. In the 'Layer editor' tab, click on the 'Save' button. Then exit the editor mode (by selecting 'Stop Edit' from the button in the 'Layer editor' or the 'Layers' panel right-click menu).


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence