QTalsim Documentation Version 0.1

QTalsim is a QGIS plugin designed to create hydrological response units (HRUs) suitable for Talsim. The plugin processes three layer, including a sub-basin layer, soil layer and land use layer. It clips the layers in accordance with the sub-basin layer’s boundaries. The plugin then intersects those three layers and creates HRUs. Additionally, the plugin offers functionality to remove duplicate geometries, overlapping features and unwanted gaps.

Overview QTalsim

Input:

Output:

Getting Started

Install Plugin

If the plugin is not installed yet, you must do this by following these steps:

  1. Navigate to the Menu Bar, select ‘Plugins’
  2. Choose ‘Manage and Install Plugins’
  3. In the search bar, type 'QTalsim'
  4. Select the 'QTalsim' plugin from the search results
  5. Click the ‘Install Plugin’ button
  6. The plugin is now installed and can be used

Once the plugin is installed you can access it by going to the menu bar, selecting ‘Vector’ and then choosing ‘QTalsim’.

Requirements for input layers

All three input layers must be polygon layers and included in the current QGIS project.

  1. Sub-basin layer

    This layer should contain the sub-basins as well as a field for Unique Identifiers and another one for slope.

  2. Soil Layer

    This layer should contain all soil types within the study area, but it must only consist of one soil layer. It must contain a field specifying the names of the soil types.

  3. Land Use Layer

    This layer should contain all land use areas within the study area, and it must contain a field specifying the names of the land use types.

Step by Step

  1. Select Sub-basin Layer

    First, select the layer containing the sub-basins from the drop-down-menu that lists all polygon layers in your current QGIS project. Confirm your selection by clicking on the ‘Confirm Sub-basins’-Button. Upon clicking this button the Sub-basin layer is selected, and overlapping features and duplicates are removed. You can inspect the result in your QGIS project (layer 'Sub-basins').

    After selecting the sub-basin layer's fields containing 1) the unique identifier and 2) the slope values must be selected from the drop-down menu. These fields are utilized in the final EFL-layer and serve as input parameters to Talsim.

    Select Sub-basin
  2. Select & Edit Soil Layer
    • Select Soil Layer

      Choose the soil layer from the drop-down menu and confirm your selection by clicking ‘Confirm Soil’. Upon doing so, all valid geometries of this layer are selected and clipped to match the boundaries of the Sub-basin layer. During this step duplicate geometries are removed from the layer and the soil mapping table is populated with the fields of the soil layer.

    • Soil Mapping

      This table contains Talsim soil parameters in the first column and all the field names of the soil layer in drop-down menus in the second column. In this step, users are required to map each Talsim parameter to its corresponding field in the soil layer. The table below shows the necessary type for these parameters. If the user-mapped field has a different datatype, the plugin, where possible, converts the field’s values to the parameter’s type. If ‘Parameter not available’ is selected, that parameter will be added with null values.

      To finalize the soil mapping, click ‘Confirm Soil Mapping’. This creates a new layer, containing all fields from the soil layer and all parameters from the soil mapping table, assigned with values from their corresponding fields. If there is a datatype mismatch between the soil layer’s field and the parameter, a warning is logged.

      Parameter Type
      ID_Soil int
      NameSoil string
      Description string
      BulkDensityClass int
      Category int
      WiltingPoint float
      FieldCapacity float
      TotalPoreVolume float
      KfValue float
      MaxInfiltration float
      MaxCapillarySuction float
      LayerThickness1 float
      Select and Edit Soil Layer
    • Optional Soil Editing Steps

      Before finalizing the soil layer, users have the option to perform some editing steps. Please refer to section Optional Editing Steps below for a detailed explanation of ‘Check for Overlapping Features’, ‘Delete Overlapping Features’, ‘Check for Gaps’ and ‘Fill Gaps’.

      In addition to the option of deleting all overlapping parts (using button 'Delete Overlapping Features'), you can also selectively remove specific overlapping soil features. This can be done via the table that populates when you click 'Check for Overlapping Features'. This table displays all overlapping soil features across two columns. For each pair of overlapping features, you can decide, which feature's geometry should stay unchanged, and which should have its overlapping part removed from its geometry. In the third column, you can select features to highlight them in the soil layer, allowing for easy viewing. After you have identified all the unwanted overlapping parts, simply press 'Delete overlapping part of selected Features' to remove the overlapping parts from the selected features.

      Optional Soil Layer Steps
    • Create Soil Layer

      This step dissolves the layer according to the Talsim parameters, removes the fields that are not required for Talsim and creates the soil layer used for the intersection.

  3. Select and Edit Land use layer
    • Select Land use Layer

      First, select the land use layer from the drop-down menu and confirm your selection by clicking ‘Confirm Layer’. Upon doing so, all valid geometries of this layer are selected and clipped to align with the boundaries of the sub-basin layer. During this process, any duplicate geometries within the layer are also removed. After confirming the layer, you must then select the field containing the land use types and confirm this selection by clicking ‘Confirm Field’. The unique land use types identified here will be used in a subsequent step.

      Select Land use Layer
    • Upload Talsim Land use Names and Parameters

      The user must upload a CSV-file that includes the Talsim land use types and their associated parameter values. This can be done by by clicking ‘Select CSV-File’, which allows the user to choose the CSV-file. It is important to select the correct delimiter for the file. After uploading, users can check the parameters by reviewing the QTalsim-Log.

      CSV-File Land use Upload CSV-File
    • Land use Mapping

      When you click on ‘Start Landuse Mapping’, the land use mapping table will be populated with all unique land use types from the layer in the first column. In the second column, a dropdown-menu with all Talsim fields of the CSV-file will appear. Here, you must match each land use type from your data (in the first column) with the corresponding Talsim land use type (in the second column). For convenience, the second column is automatically prefilled with Talsim land use types that have the same name in the layer and the CSV-file. After completing the mapping, click ‘Confirm Landuse Mapping’ to create a new layer containing the input fields from your layer and the Talsim parameter values, as specified in the CSV-file.

      Land use Mapping
    • Optional Editing Steps for Land use Layer

      After confirming the land use mapping you have the option to perform additional editing steps, such as deleting overlapping features and filling gaps. For more detailed information on these steps, please refer to section Optional Editing Steps.

      In addition to the option of deleting all overlapping parts (using button 'Delete Overlapping Features'), you can also selectively remove specific overlapping landuse features. This can be done via the table that populates when you click 'Check for Overlapping Features'. This table displays all overlapping landuse features across two columns. For each pair of overlapping features, you can decide, which feature's geometry should stay unchanged, and which should have its overlapping part removed from its geometry. In the third column, you can select features to highlight them in the landuse layer, allowing for easy viewing. After you have identified all the unwanted overlapping parts, simply press 'Delete overlapping part of selected Features' to remove the overlapping parts from the selected features.

      Optional Steps Land Use Layer
    • Create Land use Layer

      Clicking ‘Create Land Use Layer’ dissolves the layer according to the Talsim parameters, removes any fields that are not required for Talsim and generates the land use layer that will be used for intersection.

      Create Land use Layer
  4. Intersection of Layers

    This step results in the creation of the files: BOD, BOA, LNZ and EFL, which can be used as input files for Talsim. To generate the HRUs, the three layers (sub-basins, soil and land use) are intersected in a first step. The user can set a minimum size of the HRUs [m²] and a minimum percentage of HRUs relative to the sub-basin's area. HRUs that fall below the specified size or percentage share are deleted and filled using the ‘Eliminate’-tool. You can select the elimination-mode from the drop-down menu (find further information here).

    Gaps within the sub-basin layer are left unfilled, while all other gaps are appropriately filled. Any overlapping features within the resulted intersected layer are removed.

    Intersect Layers

    The resulting layers are then automatically added to the current QGIS project.

  5. Save Layers to Geopackage
  6. In the final step, these layers can be saved to a geopackage. First, you have to click ‘Select Output-Folder’ and choose a suitable folder. Once the folder is selected, you can enter a desired name for the geopackage. By Clicking ‘Ok’ the layers are saved to the selected folder in a geopackage, named as specified by the user.

    Final Steps

Optional Editing Steps

For both the soil layer and the land use layer, the user has the option to perform additional editing steps.