Skip to content

Commit

Permalink
Minor bug fixes and updates
Browse files Browse the repository at this point in the history
- HRU calculation
  - Collapse group boxes in the beginning
  - Enable group boxes once user can select them
  - Added warning if user inputs sub-basin UI that does not start with A
  - Added information about which processes have been executed
  - Fixed maximum size of HRUs/Polygons

- Sub-basins preprocessing
  - Minor bug fix that unique identifier of sub-basins does not have to
    be 'Talsim_ID'
  - Minor bug fix of unique identifier
    - If input field is not string it is now converted to string
  - Added information that imperviousness layer should be percentage

- ISRIC soil type converter
  - Added message box that user can choose if he wants to continue with
    already downloaded data
  • Loading branch information
lorenz3tla committed Nov 26, 2024
1 parent f2e92bd commit cece466
Show file tree
Hide file tree
Showing 9 changed files with 335 additions and 260 deletions.
266 changes: 90 additions & 176 deletions QTalsim/qtalsim.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion QTalsim/qtalsim_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/***************************************************************************
QTalsimDialog
A QGIS plugin
Dieses Plugin bildet für Talsim geeignete Elementarflächen.
This Plugin creates Hydrologic Response Units (HRUs), that can be used as input data for Talsim.
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin : 2023-10-12
Expand Down
111 changes: 76 additions & 35 deletions QTalsim/qtalsim_dialog_base.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1231</width>
<height>804</height>
<width>1235</width>
<height>523</height>
</rect>
</property>
<property name="sizePolicy">
Expand Down Expand Up @@ -59,18 +59,18 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-959</y>
<width>881</width>
<height>1682</height>
<y>0</y>
<width>902</width>
<height>447</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="subBasinGroupBox">
<widget class="QgsCollapsibleGroupBox" name="subBasinGroupBox">
<property name="title">
<string>Edit Sub-basin Layer</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
Expand Down Expand Up @@ -163,11 +163,17 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="eliminationGroupBox">
<widget class="QgsCollapsibleGroupBox" name="eliminationGroupBox">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>150</height>
</size>
</property>
<property name="title">
<string>Elimination of Hydrologic Response Units (HRUs)/small polygons</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_15">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout_13">
<item>
Expand All @@ -183,7 +189,7 @@
<item>
<widget class="QDoubleSpinBox" name="spinboxIntersectMinSizeArea">
<property name="maximum">
<double>100000.000000000000000</double>
<double>999999999999999945575230987042816.000000000000000</double>
</property>
</widget>
</item>
Expand Down Expand Up @@ -236,9 +242,15 @@
</item>
<item>
<widget class="QgsCollapsibleGroupBox" name="soilGroupBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="title">
<string>Edit Soil Layer</string>
</property>
<property name="collapsed">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
Expand Down Expand Up @@ -339,7 +351,7 @@
<item>
<widget class="QgsCollapsibleGroupBox" name="groupboxSoilOptional">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
Expand All @@ -350,6 +362,9 @@
<property name="title">
<string>Optional Editing Steps for Soil Layer </string>
</property>
<property name="collapsed">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_16">
Expand Down Expand Up @@ -463,7 +478,7 @@
<item>
<widget class="QgsCollapsibleGroupBox" name="landuseGroupBox">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
Expand All @@ -473,14 +488,14 @@
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>700</height>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>4000</width>
<height>16777215</height>
<height>22</height>
</size>
</property>
<property name="title">
Expand All @@ -490,13 +505,13 @@
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="flat">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="collapsed">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="saveCollapsedState">
<bool>true</bool>
Expand Down Expand Up @@ -549,10 +564,13 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QgsCollapsibleGroupBox" name="mGroupBox_2">
<widget class="QgsCollapsibleGroupBox" name="groupboxLanduseOptional">
<property name="title">
<string>Optional Editing Steps for Land Use Layer</string>
</property>
<property name="collapsed">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_24">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
Expand Down Expand Up @@ -640,14 +658,17 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupboxIntersect">
<property name="toolTip">
<string>Layers (sub-basins, soil, land use) are intersected with each other. HRUs defined as too small by the user can be deleted.</string>
<widget class="QgsCollapsibleGroupBox" name="groupboxIntersect">
<property name="enabled">
<bool>false</bool>
</property>
<property name="title">
<string>Intersection of Layers</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="collapsed">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
Expand All @@ -663,33 +684,53 @@
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPushButton" name="onPerformIntersect">
<property name="toolTip">
<string notr="true"/>
</property>
<property name="text">
<string>Intersect the Layers</string>
</property>
</widget>
</item>
</layout>
<widget class="QPushButton" name="onPerformIntersect">
<property name="toolTip">
<string notr="true"/>
</property>
<property name="text">
<string>Intersect the Layers</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="saveWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QTextEdit" name="outputPath">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
<height>50</height>
</size>
</property>
</widget>
Expand Down
4 changes: 2 additions & 2 deletions QTalsim/qtalsim_soil.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>717</width>
<height>292</height>
<width>713</width>
<height>283</height>
</rect>
</property>
<property name="windowTitle">
Expand Down
Loading

0 comments on commit cece466

Please sign in to comment.