TIN creation - the ultimate guide
    • 12 Aug 2022
    • 41 Minutes to read

    TIN creation - the ultimate guide


    Article summary

    What is a TIN?

    In Flood Modeller, a TIN, or triangulated irregular network, is used to represent a continuous water surface consisting entirely of triangular facets. It is generated from a georeferenced 1D model network and each point within the TIN will have a node label from the 1D network as an attribute (or in some special cases two node labels). You can then associate model results to each point within the TIN, enabling Flood Modeller to compute a water surface by interpolating between the point water levels.

    TINCreatorassetsimages01.png

    Why is a TIN required?

    A 1D model will calculate water levels at every node defined in the associated network. These nodes may represent river cross sections, in which case the calculated water level is assumed to apply at all points across that section (as this is the nature of a 1D model). To create a flood map from 1D results you need to interpolate between these sections, which could be referred to as “lines of constant water level”. By connecting sections using triangulation Flood Modeller can utilise standard algorithms to interpolate anywhere between these known levels to create a continuous water surface.

    The water surface is NOT a flood map. It defines the variation of water level between adjacent units within your 1D network. However, it does not consider the variation in ground levels within your model extent. To convert this into a flood map the TIN must be intersected with a ground level grid (DTM/DEM).

    1D Flood Mapping in Flood Modeller

    In Flood Modeller, the 1D flood map tool (Results tab of main toolbar) is used to subtract ground grid levels from TIN water levels (for a selected model timestep or the maximum levels occurring in a simulation). This tool requires the ground grid be defined in ASCII raster grid format (.asc) or in binary grid format (.flt). The resultant output will be a flood map consisting only of areas where the water level is above ground, i.e. depth is greater than zero. The output can be specified in the following formats:

    • Depth grid (asc or flt)
    • Shapefile “grid” - where each grid cell is a separate polygon with flood depth as an attribute (can be a very big file in this format)
    • Shapefile extent – represents the outline of the flood extent but contains no depth information.

    The nature of a 1D model allows you to manipulate your 1D network data further to generate a more detailed flood map. In addition to river sections, a network will likely contain nodes that represent other 1D model units, i.e. structures (such as bridges or weirs) or “pseudo” sections (replicates and interpolates). Water levels will be calculated for these nodes also, thus you have the option of also defining “sections” to represent the “lines” where these water levels apply. Note, these won’t relate to actual cross sections, but will be where in your water surface you wish the level calculated for the associated 1D unit to be manifested. For example, these pseudo sections can define the path of the water surface around bends in your river that have been represented solely by interpolate units. If, instead, you use only the river section units to define your TIN then some bends may be missed, or you may have to extend some sections excessively to ensure the bends are incorporated into the resulting TIN. A side effect of using the latter extending sections method is that some sections might start including additional low-lying areas away from the modelled river, that will lead to the creation of some false areas of flooding, detached from the main flood extent.

    TINCreatorassetsimages02.png

    Flood Modeller provides tools to generate these “pseudo” sections from your 1D network data. These processes will be explained in this document.

    TIN Creation Methodology

    Overall, it should be noted that the TIN process is not a quick “one-click” operation. It will require the care and attention of the modeller to generate a TIN that is a realistic representation of the modelled network. Steps to consider in this process are:

    1. Definition of sections on map – river cross sections must be georeferenced, sections to represent other 1D units must be drawn/created

    2. Simplification of sections – a typical surveyed section could consist of 50 points or more. If this is surveyed as a straight line, then you only need the start and end point for TIN definition as all points represent the same water level. If you keep all points, then the resulting TIN will likely have many, very thin triangles (as shown below). This can lead to errors during the interpolation process, resulting in inaccurate calculated flood depths.

    TINCreatorassetsimages03.png

    3. Triangulation to generate TIN – Two tools available in Flood Modeller for this:

    • Use the Toolbox triangulation function if you want to just triangulate between river section units (this method cannot incorporate pseudo sections representing other unit types). This function works directly with the network dat file, which first must be “dragged” onto the map view to display the cross sections (thus, must be georeferenced).
    • Use TIN Creator if your network has been converted to a polyline shapefile with each feature representing river cross sections or pseudo sections associated to other unit types. Note, you can also incorporate polygon shapefiles into your TIN using TIN Creator. These can be used to represent reservoir or floodplain units within your 1D network.

    4. Removal of surplus triangles / addition of extra triangles. Neither of the current triangulation methods is capable of creating the perfect TIN in “one click”:

    • TIN Creator will connect all input section data irrespective of their connectivity within the 1D network. Thus, you will likely need to delete triangles that are incorrectly connecting between non-adjacent sections within a reach
    • Toolbox triangulation function connects all sections in a reach but does not know how different reaches within a network connect. It stops triangulation when a section has a distance to next set to zero, e.g. when a structure is encountered. Thus, you may need to draw extra triangles to link up all reaches.

    5. Addition of results as attributes of TIN – you can load data directly from 1D results files (zzn/zzl) or from csv results extracted from your model using the TabularCSV tool.

    6. Intersection with ground grid – using 1D flood map tool.

    The following sections provides additional detail about each of the above stages of TIN creation.

    Defining Simplified Sections on the Map

    For a simple network, i.e. consisting of one or multiple reaches defined by river cross sections, you can drag the dat file from the Project panel onto the map. This will display the georeferenced river sections on the map and add the network to the top of the list of GIS datasets in the Layers panel. If you are using the Toolbox triangulation function, then this dataset can be used directly.

    If your network contains interpolates and/or replicates that are important for defining the path of the modelled river, or other nodes where calculated waterlevels are key to the accurate calculation of flood extent, then the above method will not be sufficient (as it only works with river sections). For these cases we need to convert all section data into one or multiple polyline shapefiles. Options for this are:

    1. Export dat file as simplified shapefile – this is a right-click menu option on the Layers panel (Export > To simplified shapefile). So, the network needs to be loaded here first (i.e. dragged onto the map or loaded using the “Add GIS data” button).

    The simplified shapefile ensures the minimal number of points are used to represent each section. If a straight section contains multiple surveyed points then this can be simplified to just two points (at the start and end). Cross sections that include changes of direction will be simplified to more than two points to ensure the shape if preserved. Minimising the number of points in a section will then minimise the number of triangles in the resulting TIN and should avoid the creation of very thin triangles (which can lead to inaccurate water level calculations).

    2. Option 1 will only convert river cross sections to shapefile format. Pseudo sections to represent other node types must be drawn as a new polyline shapefile or as additional features in your river section shapefile. To locate these correctly you can export all nodes from your dat file as a point shapefile. Right-click on the network in the Project panel and select the menu option to Export > Nodes as shapefile. Once created this can be loaded into the map view (and labels added if required, via the shapefile properties window). Then, when drawing new section lines, snapping can be activated to ensure sections pass through the correct node point.

    If you are drawing sections as a new polyline shapefile, the attributes will need to be edited to include an attribute entitled “label” in which you will need to add the appropriate 1D node label. If you use Flood Modeller to create a new polyline shapefile (selected from the Home tab of the main Toolbar), then this will be created with a “label” attribute.

    TINCreatorassetsimages04.png

    If you are appending extra features to your river section shapefile then the “label” field will already be present and will just need filling in with the appropriate node labels.

    Irrespective of the format your sections are using, they must not intersect with each other. If an intersection exists, then this means there is a common point that is part of two different sections. Different sections will have different water levels associated to them, but a point cannot represent different levels at the same time. Therefore, you should inspect your network of sections prior to triangulating. If any intersections are present, then you should edit the shape of the relevant sections so they no longer cross.

    TINCreatorassetsimages05.png

    Triangulating your Sections to Create a TIN

    If you are using the Toolbox triangulation function to triangulate a 1D network file directly, then you need to:

    1. Highlight the 1D network file (dat file) in the Layers Panel (drag from Project panel to map view to add to Layers panel)
    2. Access the Toolbox tab in the right-hand panel
    3. Double-click on the triangulation tool (Toolbox > Flood Mapping > 1D models > Triangulate selected file).
    4. You will be prompted for a filename for the new TIN that will be generated
    5. The new TIN will be automatically loaded into the Layers panel / map view

    Alternatively, if you need to triangulate one or multiple shapefiles, i.e. any combination of points, polylines and polygons to represent all relevant 1D sections, pseudo sections and reservoirs, then you can use TIN Creator. The process for this is as follows:

    1. In the Layers panel, right click on one of your shape files to be triangulated. Select Export > To TIN with TIN Creator from the displayed menu. This will open TIN Creator in a new window with your shapefile automatically loaded, as shown below:

    TINCreatorassetsimages06.png

    You can also access TIN Creator from the Map Tools tab of the main Toolbar (click the “TIN” button). In this case you will be prompted to select which shapefile to pre-load from the list of compatible files in the Layers panel.

    The TIN Creator interface will be displayed with your selected shapefile displayed in the right-hand (shapefile) panel. The File menu in the toolbar can then be used to load one or multiple additional shapefiles to include extra points in your TIN, e.g. a polyline shapefile for cross sections or a polygon shapefile for reservoirs.

    Note: Although TIN Creator is installed as a standalone program it will not work if accessed independently from Flood Modeller.

    2. The controls to use in TIN Creator’s toolbar to generate a new TIN are as follows:

    TINCreatorassetsimages07.png

    You should be able to just click the Create TIN button and a TIN will be created in the left-hand panel from your loaded shape file:

    TINCreatorassetsimages08.png


    3. Click the Save icon in the toolbar to save your new TIN. You now have the option to further refine your TIN, e.g. remove unwanted triangles. This procedure is detailed in the next section. When all edits are completed exit the TIN Creator tool either by selecting File > Exit from the main menu or by clicking the ‘X’ in the upper right corner. The new TIN is not automatically loaded into your Flood Modeller map view, so you then need to use the Add GIS Data function to visualise this on the map.

    Preparing extra shapefiles for TIN creator

    The TIN Creator tool can combine multiple shape files into a single TIN. This enables you to combine any of the following:

    • Multiple reaches of cross sections
    • Polylines that represent interpolates, replicates, spills or structure locations
    • Polygons that represent reservoirs
    • Additional points at key locations, e.g. to manipulate the shape of the TIN

    There are two requirements of these data to ensure a TIN is created that is valid for flood mapping. These are:

    • The source shape files must contain an attribute field that defines the associated 1D network node. Accepted field names are:
      • nodea
      • node_label
      • label
      • node
      • node_lbl
      • river_lbl
    • Lines in the source shape files should not cross each other. This will not prevent a TIN being created, but the TIN will contain extra points that mark these intersections. These points are named ‘pseudo’ points as TIN Creator does not know which 1D node these refer to (as they are not points in the shape file and so do not have a node attribute).
      TINCreatorassetsimages09.png
      If the above TIN is used directly to create a flood map then this will contain ‘holes’ around the pseudo points as these areas cannot be assigned a water level from associated mode results. Therefore, the TIN must first be edited in Flood Modeller to add valid 1D node references to the pseudo points. These may be a single node label (added to TIN attribute ‘Node Label A’) or you can add two node references (added to TIN attributes ‘Node Label A’ and ‘Node Label B’) and Flood Modeller will assign an average of the two values at the pseudo point.
      A better solution to intersecting sections is to edit the cross-section shape file in Flood Modeller to remove any intersections prior to TIN creation.

    Removal of surplus triangles/addition of extra triangles in TIN creator

    TIN Creator has no information about the connectivity of your 1D network. It will triangulate between all points it is provided with. Thus, the process often creates extra unwanted triangles. You can save the TIN and exit the tool and then edit these in Flood Modeller or you can use TIN Creator editing functionality. The latter is good for quickly removing the most obvious extra triangles, however, editing in Flood Modeller enables you to overlay the cross sections in a different colour, which is good for removing triangles in more complex parts of a network. To remove triangles in TIN Creator:

    1. Select triangles in TIN panel:

    • Left click with Shift key depressed to select multiple triangles – each click selects or de-selects an extra triangle. With left button depressed and Shift key also depressed you can drag across TIN to select multiple triangles.
      Left click with Ctrl key depressed to select or de-select a single triangle
    • Press delete key
    • Undo button available in toolbar if a mistake is made.

      TINCreatorassetsimages10.png

    2. Other useful mouse functions in TIN Creator to help with triangle removal are:

    • Left button depressed and drag rectangle to define zoom area
    • Middle button depressed and drag to zoom in and out
    • Right button depressed to pan

      The other controls in the TIN Creator toolbar are summarised as follows:

    • Red, blue and gold asterisks – these are used to place different markers on polygons (so only apply if you are using a polygon shape file in your TIN). These enable areas to be excluded from the created TIN (i.e. ‘holes’).
    • Unload file (red ‘X’)
    • Recent file list and load / save project functions no longer work.

    3. As you make changes to your TIN within the tool, use the Save button in the toolbar to ensure changes are saved to the nominated filename.

    4. When all edits are completed exit the TIN Creator tool either by selecting Project > Exit from the main menu or by clicking the ‘X’ in the upper right corner. The new TIN is not automatically loaded into your Flood Modeller map view, so you then need to use the Add GIS Data function to visualise this on the map.

    Editing TIN files in Flood Modeller

    After loading a TIN into the Flood Modeller map view (i.e. so it appears in Layers panel), tools are available to add/remove/change triangles and edit node references in the underlying attribute table. An edit mode is accessed by right-clicking on the TIN in the Layers panel and selecting Start Edit from the displayed menu. The main toolbar will jump to the layer editor tab, which will only display editing tools relating to TIN files (a red asterisk displays next to the filename in the Layers panel to signify edit mode).

    TINCreatorassetsimages11.png

    Adding extra triangles

    If you have used the triangulate tool within the Flood Modeller Toolbox the resulting TIN will likely have gaps within it, i.e. where a reach has ended and a new reach has started, e.g. where a structure appears introducing a section with “distance to next” chainage set to zero. The draw option in the TIN layer editor enables extra triangles to be added to link between gaps. Note, this will usually not require any new points to be added to the TIN as triangles will just link between existing points.

    The Layer Editor tab provides the following functions for adding extra triangles to your TIN:

    Triangle- activates the drawing tool to enable new triangles to be added to your TIN (mouse cursor on map changes to a pencil icon). Once activated then each click on the map will add a new point at the click location and every third point added completes a new triangle (and a fourth click starts a new one). If you are adding a triangle along an existing edge you still need to click to define the three corner points (even though two already exist).

    To stop drawing click the Select button in the later editor toolbar. The mouse cursor will return to normal when you exit drawing mode. Note that to see the last triangle drawn you may have to click (anywhere) on the map for the view to refresh.

    Note: When drawing triangles that utilise existing points then activate snapping to ensure the new triangles link precisely to the existing TIN points (see below).

    Snapping- Enables you to select a file currently loaded in the Layers panel to snap to (multiple files can be selected). Then as you draw a new triangle the mouse cursor will ‘jump’ to the points of the nominated file so that the vertices of any new triangles drawn coincide with the existing points. The point you are snapping to will be signified by a small rectangle around it on the map as the mouse cursor approaches it.

    In most cases the most useful file to snap to is the TIN file you are editing. This enables new triangles to be added that utilise the existing points in the file, i.e. join new triangles to existing ones.

    TINCreatorassetsimages12.png

    Removing triangles

    If you need to remove additional triangles from a TIN created in TIN Creator then the TIN layer editor provides the following functions to help:

    Select- Enables you to highlight which triangles to modify:

    • Double-click to select single triangles.
    • Hold down left mouse button and drag a rectangle over TIN to select multiple triangles (if the rectangle crosses an edge then the associated triangles are selected).

    Selected triangles are by default coloured yellow. However, if you access the TIN file properties window (double-click on TIN in Layers panel) you can change the selection colour on the Symbology > Selection tab.

    Delete Selected- Removes highlighted triangles from the TIN (alternatively press the Delete key).

    Note: There is no undo option when editing your TIN, however changes are not saved until you click the Save (or Save As) button. Therefore, you can stop editing and choose not to save to roll back to the version from the last time you saved the file.

    Clear Selection- deselects all highlighted triangles, for cases where you have selected the wrong triangles for removal.

    Delete Vertex- Enables a vertex to be remove from your TIN. This action will automatically remove all triangles that utilise this vertex. When the tool is activated the mouse cursor icon will change when you hover over an existing point. Depress the left mouse button on a vertex to delete it.

    There is no undo function for changes made with this function. Therefore, if you make a mistake the only way to undo it is to exit the edit mode without saving. This will revert the TIN back to the version when you last saved.

    Exiting from layer edit mode

    When all edits are completed, use the following to stop editing your TIN:

    Save- saves changes to file. Note this process will also create a back-up of the previous version of the TIN file. The back-up will be created in the same folder as the original file, with a filename that includes a date last modified and extension ‘.bak’ (you will need to manually change the extension to ‘.htn’ in order to use the back-up).

    TINCreatorassetsimages13.png

    Save As- saves changes to file to a new, user specified filename. After saving the new file will appear in the Layers panel in place of the original.

    Stop Edit- exits the layer editor mode (the Layer Editor toolbar tab will be hidden again). If you have made changes while editing, then you will be prompted to save changes as you exit edit mode. If you want to undo any changes made, then select the option to not save changes.

    Further TIN Manipulation

    The TIN layer editor also provides the following additional functions:

    Attribute Window- There is a toolbar button to access the attribute data for the selected TIN. This can also be accessed from the Layers panel menu by right-clicking on the selected TIN in the layers list. The attribute data is displayed in a new window, as shown below:

    TINCreatorassetsimages14.png

    The lower right of the window provides a search tool that enables you to locate a node label within the attribute table. Start typing part of the node label into the search box and the tool will highlight the first matching label containing the typed text. The adjacent Next button will find further matches in the table.

    If you are in edit mode the entries in the node label columns can be edited, either by typing into a specific cell or by selecting an existing label from the list provided (lower right corner). The latter option requires you to first highlight the cell to be changed, then select the label from the list and click the ‘green tick’ button to apply the change.

    If you provide node label references in both the A and B columns, then water level results from the two nodes will be averaged and the resultant value will be applied at this point. This functionality is primarily for pseudo nodes that the TIN process has created, and which lie on the intersection of two cross sections (ideally these intersections should be removed before the TIN is created).

    Note: the edit function is not available when the attribute table is accessed when not in edit mode.

    Move Vertex- Enables the vertex of an existing triangle to be moved on the map. When the tool is activated the mouse cursor icon will change when you hover over an existing point. Depress the left mouse button on a vertex and drag to move it. The triangles linked to the vertex will appear in wireframe as the vertex is moved. When the move is complete release the mouse button and the linked triangles will be redrawn in the new location.

    TINCreatorassetsimages15.png

    This changes the shape of all connected existing triangles. Note that you cannot drag a vertex to a location that will cause triangles to intersect with other existing triangles. The tool will prevent this and not let a vertex move beyond the limits defined by the surrounding triangles.

    There is no undo function for changes made with this function. Therefore, if you make a mistake you can either redo the move to a new location or exit the edit mode without saving. The latter will revert the TIN back to the version when you last saved.

    Assigning 1D Results to a TIN

    Once a TIN is loaded in the map view and listed in the Layers Panel, the next stage for flood map creation is to assign 1D results to the TIN. Right-click on the TIN in the Layers Panel and select Load Results from the menu. This option will prompt you to select a results file (extension '.zzn') or TabularCSV output file ('.csv'). The difference between loading these two options is described below:

    1. CSV outputs – use TabularCSV tool (accessed from Results tab of main toolbar) to post process 1D results to extract data in csv text format. TabularCSV provides options to output a selection of timesteps or just the maximum and minimum values at each node. You can also select all or a subset of nodes to extract results from.

    Note: When outputting multiple timesteps, select the one timestep per column option in TabularCSV to obtain a format compatible with your TIN.

    Your TabularCSV data will be automatically added to you TIN when you select the Load Results function for the TIN and browse to your csv file. It is not possible to add TabularCSV data to a TIN that already has results from a binary file loaded.

    2. Binary results – If a 1D model output file (zzn file) is selected with the Load Results function then a new window is displayed prompting you to specify which results to load from the selected file. This window contains two tabs for specifying your results data to load. This will normally start-up displaying the Time Steps Selector tab, as shown below:

    TINCreatorassetsimages16.png

    Options provided are:

    • Select only maximum values (default setting)
    • Select only minimum and maximum values
    • Specify timesteps to load in the box provided (see below). You must untick either of the max values options first. Then populate your timestep list by:
      • Moving timesteps from the left-hand list (of all timesteps) to the selected list
      • Specify a start point, end point and interval and click the Select button to populate the list (note settings are defined in timesteps, not actual times)

    TINCreatorassetsimages17.png

    • Select a parameter to load from 1D output file – default is stage, i.e. water levels required for flood map calculation.

    Note: It is not possible to add binary data to a TIN that already has results from a TabularCSV file loaded.

    If your TIN contains node labels that do not appear in the specified binary results file, then the results loading window will start-up showing the Nodes Selector tab. This tab shows the unmatched labels from your TIN (on the Replacements sub-tab, as shown below). If you were to proceed to load data onto the TIN, then flood map calculated from this would likely contain “holes” where no data were assigned to triangle vertices.

    TINCreatorassetsimages18.png

    The Nodes Selector tab provides the option to select alternative nodes with data available (i.e. which exist in the specified binary results file) and map these to the unmatched nodes. The data from the mapped nodes will then be applied at the unmatched nodes to produce a complete water surface. This process relies on the modeller’s knowledge of the model to select suitably similar nodes.

    TINCreatorassetsimages19.png

    Note: The mapping defined will only apply for the data loaded at this time. If further data are added to the TIN later, then any required node mapping will need to be redefined.

    The selected results data will be interpolated across the surface to create a water surface (which can then be utilised to calculate a flood map – see next section). If the data selection contains multiple time steps then all will be loaded, but only one timestep will be displayed at any one time. Right-click on the TIN in the Layers panel and select Results Sets to review timesteps associated to the TIN and change which timestep is displayed in the map view. The right-click menu also includes an option to animate through all loaded timesteps.

    Generating a Flood Map from 1D Results

    The water surface created by assigning 1D results to a TIN will extend across the entire area covered by the TIN, as shown below:

    TINCreatorassetsimages20.png

    This does not consider the underlying ground level, which could be higher than calculated water level in places, thus is not an accurate representation of the modelled flood extent. To obtain a flood map (which could be a flood extent outline or flood depth grid) the TIN must be intersected with a suitable ground level dataset (e.g. DTM) using the following procedure:

    1. Access the 1D Flood Map tool from the Results tab of the main toolbar. This will open in a new window as shown below. Any TIN files and raster grids (potential ground grids in ASCII or binary flt formats) will be automatically loaded. Also, all results data associated to the TIN will also be listed in the tool.

    TINCreatorassetsimages21.png

    2. To calculate a single flood map, select the appropriate TIN, required result (e.g. timestep or max values) and the underlying ground grid. Click Run and the tool will prompt for an output format, filename and location. Options for flood map output are:

    • Grid of calculated flood depths (either ASCII, .asc, or binary, .flt, format), i.e. where depth = water level – ground level. The following shows an example of this output.

    TINCreatorassetsimages22.png

    • Polygon shapefile outlining flood extent – this contains no depth information but outline only drawn where depth is greater than zero.
    • Google Earth, kml format, polygon file – defines same flood extent outline as shapefile option
    • 2dm/dat time series grid, i.e. same format as 2D results. This option is only available when multiple timesteps are selected in the 1D flood map tool. Depth grids are calculated for each timestep and the tool combines these in a single 2dm/dat file format. This enables 1D flood map results to be animated.

    Note: If you want to process multiple 1D flood map calculations together the 1D flood map tool allows a batch of processes to be defined. Use the Add button instead of Run to add a calculation to the right-hand table. Once all required analyses are defined in the table click the Run button to process all in a single operation (this may take significant time, depending on file sizes).

    Creating a TIN using Flood Modeller’s Triangulation Function

    For simple networks, e.g. single reaches or reaches made up primarily of cross sections (with few structures) you can triangulate as follows:

    1. Drag the network from your project folder onto the map so that the river cross sections are displayed. Note that the model must be georeferenced. If it is not georeferenced then use the appropriate tools in the Toolbox to georeference the model.

    2. Highlight the model (dat file) in the GIS layers panel and select in the Toolbox; Flood Mapping > 1D Models > Triangulate selected file. This tool will first prompt you for a file name and location for the new TIN that it will create. It will then triangulate between adjacent cross sections, i.e. sections where the ‘Distance to Next’ chainage is non-zero, and add the resultant TIN to your map view.

    As an interim process, this triangulation function creates a simplified version of your cross sections that does not use all defined survey points, e.g. a straight line part of a section can be represented by just two points, one at the start and one at the end. This will lead to a simplified TIN using the minimum number of triangles (many thin triangles can lead to errors in the water surface interpolation calculations)

    TINCreatorassetsimages23.png

    The triangulation tool will add triangles along reaches until a cross section with a zero chainage is read. This signifies the presence of structure or the end of a reach. The tool will then start drawing further triangles along the next sequence of cross sections in the network file. This will create gaps in the TIN that will need to be filled in by manually drawing triangles using the TIN editing tools (see later in this section for guidance on this).

    Creating a Complex TIN using TIN Creator

    For more complex networks, i.e. multiple reaches or reaches with many structures, you may find that the number of gaps created by the simple triangulation method means it is inefficient to have to fill all of these in to create a continuous TIN. In this case you can use the standalone TIN Creator tool, which can be accessed from the Flood Modeller interface. This tool was originally part of the previous versions of the software and has not been changed for its inclusion in Flood Modeller (consequently it has a different look and feel to the rest of Flood Modeller and some functions no longer work).

    TIN Creator uses a delaunay triangulation algorithm to convert shape files of points, lines or polygons (or a combination of these) into new TIN files. This will not distinguish between different cross sections and instead consider all input points independently. This will lead to non-adjacent cross sections being connected by triangles, usually where there are bends in your reach. These ‘extra’ triangles should be removed from the final TIN as they do not represent the path of water through your model.

    The TIN Creator tool does not understand the 1D network file format. Therefore you need to convert your network into a polyline shape file (or polygon shape file for reservoir areas) before using it in TIN Creator. Ideally you should convert your network file into a simplified shape file, i.e. using the minimum number of points, so that the resulting TIN is not overly complex. Furthermore if you want to include data calculated at 1D units that are not cross sections, e.g. structures, interpolates, replicates, etc., then pseudo sections will need to be added to the shape file to represent these. These are lines drawn perpendicular to the flow direction at the 1D unit location that include a shape file attribute to reference the model node they represent model data for. Flood Modeller includes tools to generate these data (and will be discussed in the following section).

    The following steps describe the procedure for creating a TIN using the TIN Creator:

    1. Drag the network from your project folder onto the map so that the river cross sections are displayed. Note that the model must be georeferenced. If it is not georeferenced then use the appropriate tools in the Toolbox to georeference the model.

    An alternative option if your model sections are not fully georeferenced, but your model nodes are located in the correct map locations, is to ‘draw’ lines perpendicular to the direction of flow to represent lines of constant water level. Each line must then contain a reference to the model node with the corresponding water level data. Flood Modeller provides tools that can help with this option, as follows:

    • Load the gxy file for your model into the map view – you will be prompted to provide a name for the point shape file created by this process.
    • Load a polyline shape file that represents your river centre line (this must only have a point for each model node). Alternatively use the create shape file functionality with snapping set to your gxy node points to draw a line through your nodes.
    • Use Toolbox > Additional model build tools > 1D cross sections > Cross section generator to generate cross sections at each node point along your river centre line shape file. Use the river node point s shape file to provide node labels for each section drawn. Note this tool generates a ‘.sec’ file of river sections, which you then need to convert to a shape file of sections for use in the TIN Creator tool.

    2. Right click on the network file (dat or sec) in the Layers panel and select Export > To simplified shape file from the displayed menu. This will convert your sections into a polyline shape file with an attribute to represent 1D node labels (this will be picked up by the TIN Creator to assign labels to TIN points). After creating this shape file load it into your map.

    Note we use the simplified shape file option as there is no need to use every surveyed point in a straight cross section. The simplified export uses the minimum number of points required to define the section shape, i.e. two points for a straight line.

    3. Right click on the simplified shape file and select Export > To TIN with TIN Creator from the displayed menu. This will open TIN Creator in a new window with your shape file automatically loaded, as shown below:

    TINCreatorassetsimages24.png

    You can also access TIN Creator from the Map Tools tab of the main Toolbar. In this case you will be prompted to select which shape files to pre-load from the list of compatible files in the Layers panel. This method enables you to select multiple shape files to provide points for your TIN, e.g. a polyline shape file for cross sections and a polygon shape file for reservoirs.

    Note : Although TIN Creator is installed as a standalone program it will not work if accessed independently from Flood Modeller.

    4. The controls to use in TIN Creator’s toolbar to generate a new TIN are as follows:

    TINCreatorassetsimages25.png

    You should be able to just click the Create TIN button and a TIN will be created in the left hand panel from your loaded shape file:

    TINCreatorassetsimages26.jpg

    Mouse functions in TIN Creator are:

    • Left button depressed and drag rectangle to define zoom area
    • Middle button depressed and drag to zoom in and out
    • Right button depressed to pan
    • Left click with Ctrl key depressed to select or de-select a single triangle
    • Left click with Shift key depressed to select multiple triangles – each click selects or de-selects an extra triangle. With left button depressed and Shift key also depressed you can drag across TIN to select multiple triangles.

      The other controls in the TIN Creator toolbar are not needed for this procedure and can be summarised as follows:

    • Red, blue and gold asterisks – these are used to place different markers on polygons if you are using a polygon shape file in your TIN. These enable areas to be excluded from the created TIN (i.e. ‘holes’).
    • Unload file (red ‘X’)
    • Recent file list and load / save project functions no longer work.
    • These are described in more detail elsewhere in the User Guide

    5. As highlighted in the above example this process creates extra unwanted triangles. You can save the TIN and exit the tool and then edit these in Flood Modeller or you can use TIN Creator editing functionality. The latter is good for quickly removing the most obvious extra triangles, however, editing in Flood Modeller enables you to overlay the cross sections in a different colour, which is good for removing triangles in more complex parts of a network. To remove triangles in TIN Creator:

    • Select triangles – using Ctrl or Shift key with left mouse button see point 4 above)
    • Press delete key
    • Undo button available in toolbar if a mistake is made.

    6. As you make changes to your TIN within the tool, use the Save button in the toolbar to ensure changes are saved to the nominated filename.

    7. When all edits are completed exit the TIN Creator tool either by selecting Project > Exit from the main menu or by clicking the ‘X’ in the upper right corner. The new TIN is not automatically loaded into your Flood Modeller map view so you then need to use the Add GIS Data function to visualise this on the map.
    The TIN Creator tool can combine multiple shape files into a single TIN. This enables you to combine any of the following:

    • Multiple reaches of cross sections
    • Polylines that represent interpolates, replicates, spills or structure locations
    • Polygons that represent reservoirs
    • Additional points at key locations, e.g. to manipulate the shape of the TIN

      There are two requirements of these data to ensure a TIN is created that is valid for flood mapping. These are:
    • The source shape files must contain an attribute field that defines the associated 1D network node. Accepted field names are:
      • nodea
      • node_label
      • label
      • node
      • node_lbl
      • river_lbl

        Lines in the source shape files should not cross each other. This will not prevent a TIN being created, but the TIN will contain extra points that mark these intersections. These points are named ‘pseudo’ points as TIN Creator does not know which 1D node these refer to (as they are not points in the shape file and so do not have a node attribute).
        TINCreatorassetsimages27.png
        If the above TIN is used directly to create a flood map then this will contain ‘holes’ around the pseudo points as these areas cannot be assigned a water level from associated mode results. Therefore the TIN must first be edited in Flood Modeller to add valid 1D node references to the pseudo points. These may be a single node label (added to TIN attribute ‘Node Label A’) or you can add two node references (added to TIN attributes ‘Node Label A’ and ‘Node Label B’) and Flood Modeller will assign an average of the two values at the pseudo point.
        A better solution to intersecting sections is to edit the cross section shape file in Flood Modeller to remove any intersections prior to TIN creation.
        TINCreatorassetsimages28.png

    Improving Definition of Bends

    Unless your 1D model has fine spatial resolution, e.g. as fine as your final required output grid and fine enough so that it doesn’t cut across meanders, you will need to add some interpolation points. The Toolbox function Add Interpolates will introduce extra sections to better define the path of your reach. The new sections are not part of your model and so do not have any hydraulic data calculated from your simulation. Instead each interpolate will reference an actual modelled node in order to assign calculated water levels.

    The Add Interpolates tool (Toolbox > Flood Mapping > 1D Models) requires you to select your 1D model and centreline from the layers panel, your resolution (minimum interpolation distance) and give your output (shape) file a name.

    Note that this tool will require you to provide suitable node labels for the points in each added interpolate section. Then you will need to pre-process your results data (as it won’t contain results for these additional points) to add interpolated values referenced to your new node labels.

    Probably the best way of doing this is to export your results data to csv format using the TabularCSV tool. These data can then be imported into a spreadsheet software (e.g. MS Excel) where the extra node references can be added and associated results data calculated for these. If you saved these data as a new csv file then Flood Modeller allows you to upload this format to a TIN (providing the original csv file format is correctly maintained).

    Editing a TIN in Flood Modeller

    If a TIN is loaded into the Flood Modeller map view (i.e. appears in Layers panel) then an edit mode is available to enable you to add/remove/change triangles and edit node references in the underlying attribute table. The edit mode in Flood Modeller is accessed by right-clicking on the TIN in the Layers panel and selecting Start Edit from the displayed menu. The main toolbar will jump to the layer editor tab, which will only display editing tools relating to TIN files (a red asterisk displays next to the filename in the Layers panel to signify edit mode).

    TINCreatorassetsimages29.jpg

    The Layer Editor tab provides the following functions for manipulating your TIN:

    Select – Enables you to highlight which triangles to modify:

    • Double-click to select single triangles.
    • Hold down left mouse button and drag a rectangle over TIN to select multiple triangles (if the rectangle crosses an edge then the associated triangles are selected).

    Selected triangles are by default coloured yellow. However, if you access the TIN file properties window (double-click on TIN in Layers panel) you can change the selection colour on the Symbology > Selection tab.

    Delete Selected – Removes highlighted triangles from the TIN (alternatively press the Delete key).

    Note that there is no undo option when editing your TIN, however changes are not saved until you click the Save (or Save As) button. Therefore you can stop editing and choose not to save to roll back to the version from the last time you saved the file.

    Clear Selection – unselects all highlighted triangles.

    Stop Edit – exits the layer editor mode (the Layer Editor toolbar tab will be hidden again). If you have made changes while editing then you will be prompted to save changes as you exit edit mode. If you want to undo any changes made then select the option to not save changes.

    Save – saves changes to file. Note this process will also create a back-up of the previous version of the TIN file. The back-up will be created in the same folder as the original file, with a filename that includes a date last modified and extension ‘.bak’ (you will need to manually change the extension to ‘.htn’ in order to use the back-up).

    Save As – saves changes to file to a new, user specified filename. After saving the new file will appear in the Layers panel in place of the original.

    Triangle – activates the drawing tool to enable new triangles to be added to your TIN (mouse cursor on map changes to a pencil icon). Once activated then each click on the map will add a new point at the click location and every third point added completes a new triangle (and a fourth click starts a new one). If you are adding a triangle along an existing edge you still need to click to define the three corner points (even though two already exist).

    To stop drawing click the Select button in the later editor toolbar. The mouse cursor will return to normal when you exit drawing mode. Note that to see the last triangle drawn you may have to click (anywhere) on the map for the view to refresh.

    If you are drawing triangles that utilise existing points then you can activate snapping to ensure the new triangles link precisely to the existing TIN points (see below).

    Snapping – Enables you to select a file currently loaded in the Layers panel to snap to (multiple files can be selected). Then as you draw a new triangle the mouse cursor will ‘jump’ to the points of the nominated file so that the vertices of any new triangles drawn coincide with the existing points. The point you are snapping to will be signified by a small rectangle around it on the map as the mouse cursor approaches it.

    In most cases the most useful file to snap to is the TIN file you are editing. This enables new triangles to be added that utilise the existing points in the file, i.e. join new triangles to existing ones.

    TINCreatorassetsimages30.png

    Move Vertex – Enables the vertex of an existing triangle to be moved on the map. When the tool is activated the mouse cursor icon will change when you hover over an existing point. Depress the left mouse button on a vertex and drag to move it. The triangles linked to the vertex will appear in wireframe as the vertex is moved. When the move is complete release the mouse button and the linked triangles will be redrawn in the new location.

    TINCreatorassetsimages31.png

    This changes the shape of all connected existing triangles. Note that you cannot drag a vertex to a location that will cause triangles to intersect with other existing triangles. The tool will prevent this and not let a vertex move beyond the limits defined by the surrounding triangles.

    There is no undo function for changes made with this function. Therefore if you make a mistake you can either redo the move to a new location or exit the edit mode without saving. The latter will revert the TIN back to the version when you last saved.

    Delete Vertex – Enables a vertex to be remove from your TIN. This action will automatically remove all triangles that utilise this vertex. When the tool is activated the mouse cursor icon will change when you hover over an existing point. Depress the left mouse button on a vertex to delete it.

    There is no undo function for changes made with this function. Therefore if you make a mistake the only way to undo it is to exit the edit mode without saving. This will revert the TIN back to the version when you last saved.

    Attribute Window – There is a toolbar button to access the attribute data for the selected TIN. This can also be accessed from the Layers panel menu by right-clicking on the selected TIN in the layers list. The attribute data is displayed in a new window, as shown below:

    TINCreatorassetsimages32.png

    The lower right of the window provides a search tool that enables you to locate a node label within the attribute table. Start typing part of the node label into the search box and the tool will highlight the first matching label containing the typed text. The adjacent Next button will find further matches in the table.

    If you are in edit mode the entries in the node label columns can be edited, either by typing into a specific cell or by selecting an existing label from the list provided (lower right corner). The latter option requires you to first highlight the cell to be changed, then select the label from the list and click the ‘green tick’ button to apply the change.

    If you provide node label references in both the A and B columns then water level results from the two nodes will be averaged and the resultant value will be applied at this point. This functionality is primarily for pseudo nodes that the TIN process has created and which lie on the intersection of two cross sections (ideally these intersections should be removed before the TIN is created).

    The edit function is not initially available when the attribute table is accessed when not in edit mode. However, the table includes an option to start editing just attribute data. When this is ticked then the tools to replace labels using the list of existing labels are activated and you can make changes to point node references in the table.

    TIN Menu Options in Layer Panel

    Once a TIN is loaded in the map view and listed in the Layers Panel then right-clicking on the entry in the Layers Panel displays various menu options.


    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