Difference between revisions of "QGIS Extract Ground Elevation"

From Tuflow
Jump to navigation Jump to search
Line 19: Line 19:
 
<li>Open the Attribute Table of the newly created layar. Toggle editing and update "Z" attribute with "dem_m01" as shown in the image below</li>
 
<li>Open the Attribute Table of the newly created layar. Toggle editing and update "Z" attribute with "dem_m01" as shown in the image below</li>
 
[[File:QGIS Extract Ground Elevation 002.png|600px]]<br>
 
[[File:QGIS Extract Ground Elevation 002.png|600px]]<br>
Now this point layer is ready to be input with the line layer.
+
Now this point layer is ready to be input with the 2d_zsh line layer.
 
</ol>
 
</ol>

Revision as of 09:45, 20 February 2018

Introduction

This page describes the method for extracting ground elevation (or any other variable) from raster files or polygon attribute using "Point Sampling Tool". This method is useful when you want to:

  • Extract ground elevation at points snapped to breaklines
  • Define ground elevation at 1D nodes/pits snapped to 1D channel/pipes
  • etc...

In the example below, the "Z" attribute (ground elevation) of the 2d_zsh point layer in the TUFLOW Tutorial 03 is extracted from DEM file.

Method

  1. Ensure that DEM and 2d_zsh line layer files are opened, and the Point Sampling Tool plugin has been installed
  2. Convert line vertexes to points, using the preferred method described in this page
  3. Open the Point Sampling Tool
  4. QGIS Extract Ground Elevation 001.png
  5. Set the following:
    • Select the point layer converted at step 2 as the "Layer containing sampling points"
    • Select all the attribute in the point layer as well as the DEM as the "Layers to get value from"
    • Set the output layer file name
    The plugin will create a new point layer file which contains all attributes in a 2d_zsh layer and the bed elevation as the 5th attribute.
  6. Open the Attribute Table of the newly created layar. Toggle editing and update "Z" attribute with "dem_m01" as shown in the image below
  7. QGIS Extract Ground Elevation 002.png
    Now this point layer is ready to be input with the 2d_zsh line layer.