Computes the thalweg of a river using datasets derived from Airborne Laser Bathymetry (ALB) and the river axis.
This script creates an ESRI-shapefile containing the thalweg of a river. The thalweg of a river is defined as the line of the deepest points of the riverbed in flow-direction.
The implementation of this script is based on datasets derived from Airborne Laser Bathymetry (ALB) using topo-bathymetric scanners. As ALB can penetrate water, a topo-bathymetric scanner creates a 3D point cloud which contains reflected points from the terrain around the river as well as from the riverbed. However, only riverbed-points are essential for the thalweg computation.
Therefore, Python script hydThalweg offers the possibility to narrow down the number of ALB-points which are used for the thalweg derivation. If requested by the user, the script classifies the ALB-data into ground- and non-ground-points, out of which only ground-points are chosen for the thalweg derivation. Moreover, it is possible to provide a file with water surface heights and their position along the river to restrict possible thalweg points to the water surface and the main river channel. By using these two mechanisms, the thalweg computation is optimized. Not using them, without implementing a classification/point-restriction beforehand instead, can even lead to an erroneous thalweg.
Apart from that, the method for the thalweg computation itself is based on the extraction of cross-sections along the river, the calculation of one thalweg point per section and the connection of these points to form the thalweg shapefile.
The algorithm consists of the following steps:
There are two mandatory input files. First, infile accepts single files or a list of files with 3D point cloud(s) or grid data. Second, an ESRI-shapefile containing the river axis of the surveyed river section is expected for axisfile. This river axis should approximately follow the main course of the river.
The output folder for storage of the final thalweg shapefile is specified by outfile (default: current working directory/hydThalweg). Apart from that, there are two main intermediate outputs, namely the plots of the conducted cross-sections and a shapefile with the section-outlines. They are stored in the tempdir directory (default: current working directory/tempHydThalweg). The buffer shapefile and the thereby restricted ALB-data can be found in tempdir as well.
Next, if there is no (usable) already existing classification, it is recommended to set classifiyGroundPoints to 1 or 2, else the thalweg computation might be erroneous.
Additionally, providing a waterSurface file is highly recommended. If the required stationings and water surface heights are not known beforehand, the following processing strategy is possible: First, run Python script hydThalweg without waterSurface. Second, look up stationings and corresponding water surface heights for waterSurface in the stored cross-section plots.
Apart from that, a default configuration-file (cfg) is provided by the OPALS distribution. It contains default parameters for OPALS modules which are used in the script. If there is no cfg-file set by the user, the default cfg-file is used. However, it is advised to create an own cfg-file to adapt the module-parameters to individual datasets. To give an example, filters for the classification or the cross-sections can be specified in the cfg-file.
possible input | evaluates to |
---|---|
1, true, yes, Boolean(True), True | Boolean(True) |
0, false, no, Boolean(False), False | Boolean(False) |
The data used in the following example can be found in the $OPALS_ROOT/demo/
directory.
This example shows the implementation of the hydThalweg script on the point cloud strip149.las
. During its execution a classification in ground- and non-ground-points (see classifiyGroudPoints) and a restriction of the spline to the water surface (see waterSurface) is carried out. Moreover, a cfg-file which is adapted to the point cloud strip149.las
is used.
Below, the content of strip149_wsurf.txt
corresponding to the parameter waterSurface is printed. As strip149.las
covers a rather short river section, strip149_wsurf.txt
contains only few rows with stationings which are very close to each other. The overall necessary length of the txt-file for waterSurface depends on the length of the surveyed river section and the variability of its water surface height. The file contains two columns: stationings (left column) and water surface heights (right column).
Figure 2 shows a cross-section plot at a stationing of 49.0 m extracted from strip149.las
. The classification, the spline restriction and the thalweg point are well recognisable.
In figure 3 the thalweg of the river section in strip149.las
is displayed. This is the final result of Python script hydThalweg. Additionally, the section outline of the cross-section at a stationing of 49 m (see figure 2) is visible.
Example 2 also uses the ALB point cloud strip149.las
from example 1. However, neither a classification nor a spline restriction is performed. The cfg-file remains the same as in example 1.
The effects of not using the parameters classifyGroundPoints and waterSurface can be seen in figure 4. Similar to figure 2, it shows the cross-section plot at a 49.0 m stationing. As the section points were not classified, all points were used to calculate the spline. In addition, the spline was not cut at its first intersection with the water surface, so it also extends across the river bank.
Figure 5 depicts the thalweg of the river section in strip149.las
derived without classifyGroundPoints and waterSurface. There are noticeable differences to the thalweg in figure 3 in the lower half of the image.
The above conducted examples demonstrated how to apply Python script hydThalweg. They also showed the influence of different parameters on the thalweg calculation. From the variation of the parameters it becomes visible that the spline in the cross-sections of example 2 is generally not representative for the riverbed (see Fgure 4). This is due to skipping the parameters classifyGroundPoints and waterSurface without providing another classification or point restriction beforehand. Theerefore, the thalweg in example 1 is overall more accurate than the thalweg in example 2, which might even contain false thalweg points. Hence, the use of the parameters classifyGroundPoints and waterSurface is again recommended. The differences of the two thalweg lines can be seen in Figure 6.
Author C. Damm, GM
Date 29.06.2023
Damm, C. (2023). Automatische Ableitung des Thalwegs aus Laserbathymetriepunktwolken für einen naturnahen Abschnitt der Pielach [Automatic derivation of the thalweg from laser bathymetry point clouds for a near-natural section of the Pielach river] [Unpublished bachelor's thesis]. Vienna University of Technology.