Diachronix plugin
Purpose of the plugin
This plugin proposes an automatic method to segment both polygon layers of valley bottom and of active channels into blocks of equal lengths. Because the blocks of the valley bottom are used as a reference, all the active channel blocks are consistent though time. For each of them the mean width is calculated. Thanks to this method, it is possible to track over time the evolution of the widths of specific sections of an active channel (figure 1).
Necessary data
This plugin can segment valley bottom layers or active channels layers. The geometry of these layers has to be of type polygons. The coordinate reference system of these layers have to use the meters as units. Both the valley bottom layer and the active channel layers have to be associated to only one river without any tributaries (figure 2).
As shown on figure 2, if there are a main river and a tributary, the user has to create a valley bottom layer, or active channels layers, specifically for each river. The valley bottom layer could be manually digitized based on geological maps. The active channels layers could be manually digitized based on aerial photographs. It is better to start the digitizing by the upstream part of the valley bottom or of the active channel in order to follow the natural way of the river.
General method
The method on which is based this plugin was developed by Frédéric Liebault and Guillaume Piton (INRAE/ETNA). The user should provide a reference layer, which is in most of the cases the layer of the valley bottom. This valley bottom is the geological maximum extent of the flood plain. We do the hypothesis that the actual flood plain is entirely included within the extent of the valley bottom. As said previously, this layer may be digitized based on geological maps. However, if it is not possible to create this layer, the user may just create a very large buffer around the river. The buffer should be large enough to include totally the actual flood plain. Once this reference layer is set, the user should digitized one, or many, active channel layers. This digitizing may be based on aerial photographs. In the case the user would like to compare active channels at different dates, one layer per date should be digitized.
Then, the reference layer is segmented in blocks of equal lengths. The length is provided by the user. An id and a distance from the starting point are associated to each block of the reference layer. After this segmentation, the active channel layers are clipped according to the blocks of the reference layer. The mean width is then calculated for each block of active channel. Thanks to this, the block number n of the reference layer always corresponds to the block number n of the active channel layers. So the user may track over time the evolution of the width of a specific block of active channel. The figure 1 gives an overview of the method.
The use of the plugin
Prerequisites
The Diachronix plugin requires at least QGIS 3.14. The plugin was successfully run on Windows and on Linux. In order to be run, the Diachronix plugin necessitates another plugin called Geometric attributes. Here, this plugin is used to calculate the centerlines of the different layers. However, the co-installation of this plugin should be automatic. Before to run the plugin the layers to be segmented should be loaded in QGIS.
Running the plugin
The plugin could be run either through the Extensions menu or by clicking on the corresponding icon. The main window of the plugin could be divided in three parts (figure 3).
In the part 1, the user may choose :
- to calculate the blocks of the bottom valley layer (i.e. the reference layer) only, by checking the Valley bottom blocks box
- to calculate the blocks of the active channel layer only, by checking the Active channel blocks box
- to calculate the blocks of both the reference layer and of the active channel layer once, by checking the Valley bottom and active channel blocks box
Segmentation of the reference layer
First, it is recommended to run only the segmentation of the reference layer by checking the box Valley bottom blocks. Once this checkbox is checked, the part 2 of the main window becomes accessible. First, in the menu Valley bottom, the user should select the layer corresponding to the valley bottom, or to the reference layer to be used. At this step, if we are not sure if the polygon starts from the upstream part of the valley we can click on To detect the starting point and OK. A new point layer will appear showing the starting point of the layer. However, we may note it is not always obvious to determine the starting point.
Then the user may choose a length for the blocks to be calculated at the line Distance between two cross-sections. By default this length is set to 100 m. The user is free to use any length but very short lengths may produce some issues later on the process. The user should then set the Cross-sections widths to be used. This cross-section width should be large enough to always be larger than the maximum width of the layer to be segmented.
At the line Valley bottom blocks (output) the user sets a path and a name for the layer containing the resulting blocks which will be created. The format of this layer may be shapefile or GeoPackage. At the line Table of valley bottom blocks (output) the user sets a path and a name for the table which will contain the data relative to the resulting blocks. This table can be stored in csv, in Excel format (.xlsx) or in OpenDocument format (.ods). This table is exactly the same as the attribute table of the produced layer. The user may choose To reverse the starting point in order to start the blocks from the upstream part of the valley or from the downstream part of the valley. In order to check the intermediate layers, the user may load the temporary layers by clicking on To load the temporary layers. By clicking on OK, the blocks of the bottom valley layer will be produced. The process may take from some seconds to a few minutes according to the size of the layer to be segmented. The attribute table of the bottom valley blocks layer is shown on the figure 4.
In this attribute table, the fid and ID fields are just two ID fields. Each block has a unique ID. The other fields are:
- distance: the distance in meters between the centroid of the block and the upstream part (or the downstream part) of the valley (figure 5).
- area_m2: the area in m2 of each block
- length_m: the length in meter of each block along its centerline. These lengths are always very close to the length set by the user for the Distance between two cross-sections.
- mean_width_m: the mean width of each block in meter. This mean width is simply the ratio of the area of each block by the length of each block.
The plugin also exports the result in a simple table format (.csv, .xlsx or .ods). This table is exactly the same as the attribute table of the exported layer but allows the user to directly work on it outside from QGIS (figure 6).
Segmentation of the active channel layer
Once the reference layer is segmented, we can use it to segment the active channel layer. To do it, in the part of the main window called Process to be performed, the user has to check Active channel blocks. By doing this, the Active channel part of the window becomes available. At the line Active channel, the user should select the layer of the active channel to be segmented. At the line Valley bottom blocks, the user should set the path to the reference layer to be used for the segmentation. This reference layer is the one produced at the previous step. These two layers may be in shapefile or in GeoPackage. At the line Active channel blocks (output), the user should set the path and the name of the layer which will be produced after the segmentation of the active channel. At the line Table of active channel blocks (output), the user should set the path and the name of the resulting simple table. This table could be in .csv, .xlsx or in .ods. Finally, if wished it is possible to load the temporary layers by checking the line To load the temporary layers.
As a result, we obtain the layer of the segmented active channel. The fields of the attribute table are exactly the same as the ones of the Bottom valley blocks. It is the same for the simple exported table.
Segmentation of the reference layer and of the active channel layer in once
The user may also run the segmentation of the reference layer and of the active channel layer in once. To do this, the user should check the Valley bottom and active channel blocks option in the part Process to be performed of the main window. Once this option is checked, both the parts dedicated to the segmentation of the reference layer and to the segmentation of the active channel layer becomes available. The only change takes part in the part dedicated to the segmentation of the active channel layer. The user should not any more set the path to the segmented reference layer to be used because the process will automatically use the one produced here.
Limitations
The plugin suffers from some limitations listed below.
The distance between two cross-sections
As said previously, the distance between two cross-sections is freely set by the user. However, this distance should not be too small in order to avoid some issues in the building of the blocks. The figure 7 shows the issues when this distance is too short.
To avoid this issue, we have to set a larger distance between two cross-sections.
The width of the cross-sections
The width of the cross-sections is freely set by the user. However, this width should be larger than the maximum width of the layer to be segmented. Otherwise, some blocks will be missing, resulting in blocks of non equal lengths (figure 8).
As shown on the figure 8, the blocks 1 and 2 are not well segmented. They are two times longer than the normal blocks. This is explained by the cross-sections 1 and 2 used for the segmentation. These two cross-sections are too short compared to the maximum width of the layer to be segmented. To avoid this issue, we have to set a larger value for the width of the cross-section.
The cross-sections and the centerlines
In the initial method, the cross-sections should be perpendicular to the centerlines of the layers to be segmented. However, this notion of perpendicular is not so obvious to implement in an automatic method. Thus, in this plugin the cross-sections are not always perpendicular to the cross-sections as shown on the figure 9.
As shown on the figure 9, the cross-section 1 is not perpendicular to the centerline. Because of this, the area of the block 1 is slightly underestimated compared to the block 2 which is slightly overestimated. However, this limitation has relatively few impacts on the calculation of the mean widths of the blocks.
High sinuosity
In the case of rivers with high sinuosity, some issues may appear in the meanders. In the meanders, one cross-section may cut two times the layer to be segmented. When this case happens, some blocks are missing (figure 10).
To avoid this issue, the user may shorten the width of the cross-sections or make the distance between the cross-sections larger.
Authors, contributors and contact
The geomorphological part was carried out by Frédéric Liébault (INRAE), Guillaume Piton (INRAE), Margot Chapuis (Université Côte d'Azur) and Gabriel Melun (OFB). The implementation in Python was done by Paul Passy (Université Paris Cité - PRODIG), Sylvain Théry (CNRS - ART-Dev) and students in geomatics (ENSG) : Judith Nabec, Estelle Stefanini, Damien D-Arras and Fernando Rico-Quintero.
Contact
For any comments or questions, feel free to contact the developpers: paul.passy[at]u-paris.fr, sylvain.thery[at]cnrs.fr