- 06 Nov 2022
- 9 Minutes to read
How to create a new TIN
- Updated on 06 Nov 2022
- 9 Minutes to read
Flood Modeller uses a triangulated irregular network (TIN) file to convert 1D water level data, defined in cross-sections and/or polygons (for example, reservoirs) into a continuous water surface. These data can then be intersected with ground-level data to generate flood extent outlines flood maps. Flood Modeller offers two methods for creating a TIN. Your choice of tool is dependent on input data format and personal preference. Both methodologies are described in this section. You may also find this guide on Navigating the TIN canvas helpful.
In either case, you must initially load the data. TIN files can be generated from one or multiple shapefiles. These data can be any combination of points, polylines and polygons. The source files should contain references to model nodes, as part of the associated dbf data. These references are then carried over into the TIN and used to assign model results data to the points of the TIN. Flood Modeller can also generate a TIN directly from a cross-section layer (dat or sec file) loaded in the viewport. The following options are available to add compatible files to the viewport:
- If a shapefile of model data (eg cross-section polylines or flood cell reservoir polygons) already exists, you can load this into the viewport using the 'Add GIS' Data button from the GIS data tool group on the 'Home' tab. This displays a standard Windows browser which can then be used to select the required file or files.
- A new polyline or polygon shapefile can be defined by drawing directly on the Map View area. Click on the 'New' button in the GIS data tool group on the 'Home' tab and select 'Shapefile' from the drop-down menu.
- Flood Modeller can import geo-referenced 1D model files. You can load these into the viewport using the 'Add GIS Data' button from the GIS data tool group on the 'Home' tab. This displays a standard Windows browser which can then be used to select the required file.
- Flood Modeller can generate new 1D cross-section files from a node point location file (‘.gxy’ file). These data are loaded as a point shapefile and the Cross Section Generator tool (in the Toolbox > Additional Model Build Tools > 1D Cross Sections) can be used to convert these data into a set of cross-sections (refer to How to create new 1D river cross-sections from a map ).
To generate a TIN from a 1D model file (ie dat or sec file) that has been imported into your Flood Modeller map view, you can use the automatic TIN creation tool provided in the Toolbox (in right-hand panel) as follows:
Highlight the model file in the 'Layers' panel
In the Toolbox, double-click on the option Flood Mapping > 1D Models> Triangulate Selected File
You will be prompted to provide a filename for the new TIN file. Enter a filename and location and click 'Save' to continue.
The new TIN file will be added to your map view (at the top of your Layers panel).
Note: the TIN file is generated using the minimum number of cross-section points only, rather than all the points in each of your cross-sections. For example, a straight line cross-section will only require two points - one at either end. There is no need for more complex arrays of triangles using all cross-section points as the water level will be constant across the entire section in a 1D model. Additional points are only used in a TIN to define cross-sections containing changes of direction (ie not single straight lines).
To create a new TIN from a shapefile:
Load all required shapefiles - Any combination of points, polylines and polygons. If TIN Creator is accessed from the right click Layers panel menu for a shapefile loaded in your Flood Modeller map view (Export > To TIN with TIN Creator) then the selected shapefile in Flood Modeller will automatically appear in the TIN Creator canvas. Alternatively you can add shapefiles to the canvas using the TIN Creator File menu.
If you are passing a shapefile from your map view to be converted into a TIN, you are prompted for a filename for the new file. This is specified using a standard Windows Explorer browser window. Click the 'Save' button to continue. The TIN Creator tool will then automatically open into the viewport with your selected shapefile pre-loaded.
Additional shapefiles can be added to the shapefile viewer in TIN Creator. Note, Flood Modeller files are displayed as polyline shapefiles in TIN Creator (Flood Modeller automatically carries out this conversion). Extra 1D model files cannot be loaded directly into TIN Creator (they would have to be first exported from Flood Modeller as a shapefile, an option in the 'Export' section of the 'Layers' panel right-click menu).
Fill out the required options in the TIN creator:
Select Convex Hull - Select this button in the toolbar to construct an envelope around all loaded shapefiles during the triangulation process. This will link all loaded shapes into a single TIN, unless any individual shape has been specified as a hole. If this option is not selected then the triangulation will be confined within the boundaries of only the loaded polygons. The default option is for the convex hull function to be active.
Insert holes in TIN - To exclude a shape from the TIN this can be done by loading a polygon of the area that is to be omitted, alongside the shapefile of the points to be triangulated. To exclude the polygon, activate the 'Put Hole on Canvas' function by clicking the appropriate button in the toolbar. Then left-click inside the polygon on the shapefile canvas. A red dot should appear in the polygon indicating that it has been tagged. When the TIN is produced the area inside this polygon will be excluded. To untag a polygon from being a hole; activate the 'Put Hole on Canvas' function and right-click on the red dot of the polygon to be untagged. When the red dot disappears then the polygon is untagged.
The ESRI convention is for polygon shapefiles defined in an anti-clockwise direction to be automatically classified as holes. Thus, TIN Creator will mark all polygons of this type as holes by default. All clockwise defined polygons will be used to define the TIN normally, i.e. not tagged as holes. TIN Creator also provides the user with the following additional options:
A function to mark all polygons as holes upon loading irrespective of their direction property (yellow asterisk button).
A function to remove the hole setting from all loaded polygons (blue asterisk button).
Triangulate - To produce a TIN click the 'Triangulate' button. This process should take a few seconds. Each point within the TIN has the following information associated to it:
- Field A - populated by node label if available
- Field B - populated by second node label (pseudo points only)
These data are displayed in the status bar below the TIN Creator canvases. Hold the mouse over a TIN point to see the associated information in the status bar.
Useful tip : Before triangulation, polygons can be marked as 'holes' using the red star button. This means highlighted polygons will be excluded from the TIN (triangulation will happen around them, with empty space within the polygon boundary). This can be useful to represent areas of higher, non-flooded ground eg buildings.
Useful tip : Sometimes the triangulation process needs to introduce extra points to complete successfully. In these cases, the new 'pseudo' points require a node reference to enable water level data to be assigned.
Pseudo-points are added to the TIN canvas where the existing points are not sufficient to produce a triangulation. They are usually required when the source shapefiles contain intersecting features. These are shown as green on the TIN canvas (points from the shapefile are shown in black). When created, pseudo points will contain no reference to model nodes, however they can be associated to two adjacent nodes. When model data are added to the TIN water levels at the pseudo point will be calculated by interpolating between the two associated points.
To assign node labels to a pseudo point:
- Select the pseudo point by clicking on it. The footer information will show the pseudo point details in green alongside the node information from the cursor location. The fields A and B of the point will initially be blank.
- Move the mouse pointer over an adjacent TIN point where a node label has been assigned. Left-clicking on this point while holding the 'Ctrl' key will add this node label to field A of the selected pseudo point.
- Move the mouse pointer over another adjacent TIN point where a node label has been assigned. Left-clicking on this point while holding the 'Shift' key will add this node label to field B of the selected pseudo point.
Useful tip : Sometimes the triangulation process creates extra triangles that link points that are not adjacent. TIN Creator tools enable individual or multiple triangles to be deleted from the TIN.
Node labels - If the loaded shapefiles contained node label information in one of the dbf fields recognised by TIN Creator then these labels will be transferred to the points within the TIN. The node label will be assigned to field A of each TIN point. This enables 1D model results to be associated to the TIN in order to generate flood extents. The dbf fields recognised by TIN Creator as node labels are:
Saving a TIN - The new TIN can be saved to a user specified location using the 'Save' or 'Save As' menu items or the 'Save' button in the toolbar. If TIN Creator has been accessed from Layers panel right-click menu then the new TIN can be uploaded back into Flood Modeller by clicking the Flood Modeller icon in the toolbar.
Upload TIN to Flood Modeller viewport - If you have accessed TIN Creator with a shapefile (from Flood Modeller pre-loaded), you should see Flood Modeller's icon on the TIN Creator toolbar (last button on right). If you click this button, TIN Creator will shut down and your new TIN file will be automatically loaded into Flood Modeller.
Alternatively, you may need to load your TIN file into Flood Modeller manually. In this case, click on the 'Save TIN' button in the TIN creator toolbar and then load it into Flood Modeller by clicking on 'Add GIS Data' from the GIS data tool group in the 'Home' tab.
Change TIN's appearance in your map view. Note, the default setting is to load TIN files with all triangles filled in. The properties panel can be used to change this setting to display the triangle framework only. Access the properties window by right-clicking on the TIN in the 'Layers' panel and selecting 'Properties' from the displayed menu. Then select the Visual Style/Symbology and set filling visible to 'false'), as shown below: