QGIS Create a TIN: Difference between revisions

Content deleted Content added
 
(11 intermediate revisions by the same user not shown)
Line 1:
<span style="color:#FF0000">
<font size = 18>Page Under Construction</font>
</span>
 
=Introduction=
TUFLOW offers powerful tools for modifying a model's geometry, including generating Triangulated Irregular Networks (TINs) from input data. Alternatively, as outlined on this page, users can create TINs in QGIS before importing them into TUFLOW. The advantage of this approach is that it allows the user to visualise and review the TINs before they are included in the model.
:'''Note:''' The QGIS TUFLOW Plugin tool <u>[[QGIS_TIN_Polygons_Assign_Elevations|TIN Polygons - Assign Elevations]]</u> can also be used to assign elevations to a TIN polygon, using a raster.<br>
 
To demonstrate the workflow, the DEM and GIS files from <u>[[Tutorial_M02#Part_2_-_Other_Topographic_Updates|Tutorial Module 2 (part 2)]]</u> are used as examples. The tutorial dataset can be downloaded from the <u>[[Tutorial_Introduction|Tutorial Model Introduction]]</u>. The instructions below refer to the GeoPackage format, but Shapefile format is also supported.
To create a TIN, the following files are needed:
 
To create a TIN in QGIS, the following files are needed:
* A DEM (raster) layer.
* 2d_zsh (Z shape) layers that define topological modifications:
Line 14 ⟶ 13:
:: If multiple, repeat the <u>[[QGIS_Create_a_TIN#Extract_Elevation_of_Breakline_Vertices_From_IDW_Interpolation | Extract Elevation of Breakline Vertices]]</u> process for each layer. Then, include all outputs in the <u>[[QGIS_Create_a_TIN#Create_TIN_Mesh | Create TIN Mesh]]</u> process.
'''Note:''' All features in the points and breaklines layers must be within the polygon extent.
 
To demonstrate the workflow, the DEM and GIS files from <u>[[Tutorial_M02#Part_2_-_Other_Topographic_Updates|Tutorial Module 2 (part 2)]]</u> are used as examples. The instructions below refer to the GeoPackage format, but Shapefile format is also supported.
<br>
 
=Method=
==Densify Polygon Vertices==
Densify the polygon vertices using the QGIS processing tool 'Densify by Interval'. For more information about this tool, please refer to the <u>[https://docs.qgis.org/3.3440/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#densify-by-interval QGIS Documentation - Densify by Interval]</u>.
<ol>
<li>In QGIS, open the polygon layer (e.g. '''TUFLOW\model\gis\2d_zsh_M02_landscape_002_R''').<br>
Line 45 ⟶ 42:
 
==Extract Elevation of Polygon Vertices from DEM==
Extract elevation at polygon vertices from DEM using the QGIS processing tool 'Drape (set Z value from raster)'. For more information about this tool, please refer to <u>[https://docs.qgis.org/3.3440/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#drape-set-z-value-from-raster QGIS Documentation - Drape]</u>.
<ol>
<li> In QGIS, open the DEM file (e.g. '''TUFLOW\model\grid\DEM.tif''').
<li>Go to 'Vector geometry' in the Processing Toolbox panel and select 'Drape (set Z value from raster)'. This opens the dialog shown below:
*Input layer: '''Densified_Polygon'''
Line 57 ⟶ 54:
<br>
<li>The resulting layer, called '''Draped''' will appear in the QGIS Layers panel. Right click '''Draped''' and select 'Rename Layer'. Rename the layer to '''Draped_Polygon'''.
:'''Note:''' This tool assigns elevations to the vertices of the input layer ('''Densified_Polygon''') and outputs a layer of the same type (in this case, a polygon). As such, '''Draped_Polygon''' contains only one attribute.
</ol>
 
==Generate IDW Interpolation==
Generate aan IDW (Inverse Distance Weighted) interpolation of the Z shape points layer (points layer containing elevation data), using the QGIS processing tool 'IDW Interpolation'. For more information about this tool, please refer to <u>[https://docs.qgis.org/3.3440/en/docs/user_manual/processing_algs/qgis/interpolation.html#qgisidwinterpolation QGIS Documentation - IDW Interpolation]</u>.
<ol>
<li> In QGIS, load all Z shape points layers within the polygon extent (e.g. '''TUFLOW\model\gis\2d_zsh_M02_landscape_002_P''').
Line 83 ⟶ 81:
 
==Extract Elevation of Breakline Vertices From IDW Interpolation==
Extract elevation at breakline vertices from '''Interpolated''' using the QGIS processing tool 'Drape (set Z value from raster)'. For more information about this tool, please refer to <u>[https://docs.qgis.org/3.3440/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#drape-set-z-value-from-raster QGIS Documentation - Drape]</u>.
<ol>
<li> In QGIS, load the breaklines layer (e.g. '''TUFLOW\model\gis\2d_zsh_M02_landscape_002_L''').
Line 98 ⟶ 96:
 
==Create TIN Mesh==
Create a TIN Mesh using the QGIS processing tool 'TIN Mesh Creation'. This tool will generate a TIN mesh from the above outputs and any Z shape points layers (points layers containing elevation data). For more information about this tool, please refer to <u>[https://docs.qgis.org/3.3440/en/docs/user_manual/processing_algs/qgis/mesh.html#tin-mesh-creation QGIS Documentation - TIN Mesh Creation]</u>.
<ol>
<li>Go to 'Mesh' in the Processing Toolbox panel and select 'TIN Mesh Creation'. This opens the dialog shown below:
Line 108 ⟶ 106:
*Output format: 2DM
*Output coordinate system: Use the project CRS.
*Output file: Save to the model's '''grid''' folder ('''TUFLOW\model\grid'''). EnsureName the TIN and ensure the file extension is '''.2dm''' (e.g. '''TIN_Mesh.2dm''').
<li>Click 'Run'. Once the tool is finished, click 'Close'. <br>
<br>
Line 130 ⟶ 128:
<tt><font color="blue">Set Zpts </font><font color="red">==</font> 100 <font color="green"> ! Sets every 2D elevation zpt to 100 metres</font></tt><br>
<tt><font color="blue">Read GRID Zpts </font><font color="red">==</font> grid\DEM.tif <font color="green"> ! Assigns the elevation of zpts from the grid</font></tt><br>
<s><tt><font color="bluegreen">! Read GIS Z Shape </font><font color="red">==</font> 2d_zsh_M02_landscape_002_R | 2d_zsh_M02_landscape_002_L | 2d_zsh_M02_landscape_002_P <font color="green"> ! Defines areas of complex landscaping</font></tt></s><br>
<tt><font color="blue">Read TIN Zpts </font><font color="red">==</font> grid\TIN_Mesh.2dm | 2d_zsh_M02_landscape_002_R <font color="green"> ! Defines areas of complex landscaping</font></tt><br>