QGIS Create a TIN

From Tuflow
Revision as of 15:23, 23 January 2025 by Emilie Nielsen (talk | contribs)
Jump to navigation Jump to search

Page Under Construction

Introduction

Method

This example uses the DEM and GIS files from Tutorial Module 2 (part 2).

Densify Merge Polygon Vertices

Densify the merge polygon vertices using the QGIS processing tool 'Densify by Interval'. For more information about this tool, please refer to the QGIS Documentation - Densify by Interval.

  1. In QGIS, go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox.

    Open processing toolbox.png

  2. Go to 'Vector geometry' in the processing tool list and select 'Densify by interval'. This opens the dialog shown below:
    • Input layer: Select the merge polygon (e.g. 2d_zsh_M02_landscape_002_R).
    • Interval between vertices to add: This value should set to the smaller of the following two values - half the model cell size, or the finest quadtree level.
    • Densified: Leave as default.
    • Tick on 'Open output file after running algorithm'.
  3. Click 'Run'. Once the tool is finished, click 'Close'.

    QGIS Create TIN Densify Polygon 01.png

  4. The resulting layer, called Densified will appear in the QGIS Layers panel. This is a copy of the merge polygon, now updated with additional vertices based on the specified interval.
  5. In the QGIS Layers panel, right click Densified and select 'Rename Layer'. Rename the layer to Densified_Polygon.
    Note: To see the vertices, toggle on editing for Densified_Polygon and select the 'Vertex Tool' Vertex tool icon.png from the Digitizing toolbar. Hover over the polygon to see the vertices.

    QGIS Create TIN Densify Polygon 02.png

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 QGIS Documentation - Drape.

  1. Go to 'Vector geometry' in the processing tool list and select 'Drape (set Z value from raster)'. This opens the dialog shown below:
    • Input layer: Densified_Polygon
    • Raster layer: Select the DEM file.
  2. Leave all other options as default and ensure 'Open output file after running algorithm' is ticked on.
  3. Click 'Run'. Once the tool is finished, click 'Close'.

    QGIS Create TIN Drape Polygon 01.png

  4. 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.

Generate IDW Interpolation

Generate a IDW (Inverse Distance Weighted) interpolation of the z shape points layer, using the QGIS processing tool 'IDW Interpolation'. For more information about this tool, please refer to QGIS Documentation - IDW Interpolation.

  1. Go to 'Interpolation' in the processing tool list and select 'IDW Interpolation'. This opens the dialog shown below:
    • Vector layer: Select the z shape points layer (e.g. 2d_zsh_M02_landscape_002_P).
    • Interpolation attribute: Select Z. This is the attribute that contains elevation data.
    • Click QGIS 3D Animation add keyframe button 01.png to add the vector layer to the table. Repeat the above two points for all points layers within the merge polygon extent.
    • Distance coefficient P: Leave as default.
    • Extent: Click 40 and select 'Calculate from Layer' >> 'Draped_Polygon'.
    • Interpolated: Leave as default.
    • Tick on 'Open output file after running algorithm'.
  2. Click 'Run'. Once the tool is finished, click 'Close'.

    QGIS Create TIN IDW Interpolation 01.png

  3. The resulting file, called Interpolated will appear in the QGIS Layers panel.

    QGIS Create TIN IDW Interpolation 02.png

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 QGIS Documentation - Drape.

  1. Go to 'Vector geometry' in the processing tool list and select 'Drape (set Z value from raster)'. This opens the dialog shown below:
    • Input layer: Select the breaklines layer (e.g. 2d_zsh_M02_landscape_002_L).
    • Raster layer: Interpolated
  2. Leave all other options as default and ensure 'Open output file after running algorithm' is ticked on.
  3. Click 'Run'. Once the tool is finished, click 'Close'.

    QGIS Create TIN Drape Lines 01.png

  4. The resulting layer, called Draped will appear in the QGIS Layers panel. Right click Draped and select 'Rename Layer'. Rename the layer to Draped_Lines.

Conclusion