-
-
+ -
+
true
+
+
+
- Starting connection node
+ 2D exchange
-
- -
-
-
-
- 0
- 0
-
-
-
- QAbstractSpinBox::NoButtons
-
-
- 3
-
-
- -1000.000000000000000
-
-
- 1000000.000000000000000
-
-
- true
-
-
- true
-
-
- true
-
-
-
- -
-
-
- Node code
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+ -
+
+
+
-
-
- -
-
- Node initial water level [m]
+ Exchange level [m MSL]
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
- 10
+ -1
- -
-
+ -
+
0
0
-
- true
+
+
+
+
+ Qt::ImhNone
QAbstractSpinBox::NoButtons
-
- 999999999
+
+ 3
-
- true
+
+ -9999999999.000000000000000
-
- false
+
+ 9999999999.000000000000000
- -
-
+ -
+
- Connection node ID
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+ x
- -
-
-
-
- 0
- 0
-
-
-
- true
+ -
+
+
+ Exchange type
- -
-
+ -
+
+
+
+
+
+ -
+
+
+ Administrative properties
+
+
+ -
+
0
0
+
+
+
+
+ Qt::ImhNone
+
QAbstractSpinBox::NoButtons
3
-
- 999999999.000000000000000
+
+ -9999999999.000000000000000
-
- true
+
+ 9999999999.000000000000000
- -
-
+ -
+
+
+
+
- Node storage area [m²]
+ Manhole surface level [m]
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
- 10
+ -1
- -
-
-
- x
+ -
+
+
+
+ 50
+ false
+ false
+
-
-
- -
-
x
@@ -1211,6 +2089,30 @@ coefficient positive
+ -
+
+
+ 0
+
+ -
+
+
+ Tag
+
+
+
+ -
+
+
+ true
+
+
+ Open this feature's own attribute form to see its tags
+
+
+
+
+
@@ -1244,9 +2146,6 @@ coefficient positive
friction_type
discharge_coefficient_negative
discharge_coefficient_negative_clear
- zoom_category
- sewerage
- external
cross_section_shape
cross_section_width
cross_section_width_clear
@@ -1257,20 +2156,8 @@ coefficient positive
cross_section_table_copy
cross_section_table_paste
cross_section_table_add
- connection_node_start_id
- connection_node_end_id
- connection_node_1_id
- connection_node_1_code
- connection_node_1_initial_waterlevel
- connection_node_1_initial_waterlevel_clear
- connection_node_1_storage_area
- connection_node_1_storage_area_clear
- connection_node_2_id
- connection_node_2_code
- connection_node_2_initial_waterlevel
- connection_node_2_initial_waterlevel_clear
- connection_node_2_storage_area
- connection_node_2_storage_area_clear
+ connection_node_id_start
+ connection_node_id_end
diff --git a/threedi_schematisation_editor/icon.png b/threedi_schematisation_editor/icons/icon.png
similarity index 100%
rename from threedi_schematisation_editor/icon.png
rename to threedi_schematisation_editor/icons/icon.png
diff --git a/threedi_schematisation_editor/import.png b/threedi_schematisation_editor/icons/icon_import.png
similarity index 100%
rename from threedi_schematisation_editor/import.png
rename to threedi_schematisation_editor/icons/icon_import.png
diff --git a/threedi_schematisation_editor/icons/icon_load.svg b/threedi_schematisation_editor/icons/icon_load.svg
new file mode 100644
index 0000000..0f5bec3
--- /dev/null
+++ b/threedi_schematisation_editor/icons/icon_load.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/threedi_schematisation_editor/icons/icon_unload.svg b/threedi_schematisation_editor/icons/icon_unload.svg
new file mode 100644
index 0000000..9315d60
--- /dev/null
+++ b/threedi_schematisation_editor/icons/icon_unload.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/threedi_schematisation_editor/metadata.txt b/threedi_schematisation_editor/metadata.txt
index 0b1d9ae..7a62861 100644
--- a/threedi_schematisation_editor/metadata.txt
+++ b/threedi_schematisation_editor/metadata.txt
@@ -1,9 +1,9 @@
[general]
name=3Di Schematisation Editor
-qgisMinimumVersion=3.22
+qgisMinimumVersion=3.28
qgisMaximumVersion=3.99
description=3Di Schematisation Editor for QGIS
-version=1.13.1
+version=1.99.3
author=Lutra Consulting for 3Di Water Management
email=servicedesk@nelen-schuurmans.nl
about=View and edit 3Di schematisations in the Modeller Interface.
@@ -27,7 +27,7 @@ tags=3di, edit, 1D, hydraulics
homepage=https://www.3diwatermanagement.com
category=Plugins
-icon=icon.png
+icon=icon/icon.png
experimental=False
hasProcessingProvider=no
diff --git a/threedi_schematisation_editor/processing/__init__.py b/threedi_schematisation_editor/processing/__init__.py
index bc394ee..b5a193a 100644
--- a/threedi_schematisation_editor/processing/__init__.py
+++ b/threedi_schematisation_editor/processing/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
import os
from qgis.core import QgsProcessingProvider
@@ -9,7 +9,6 @@
from threedi_schematisation_editor.processing.algorithms_1d2d import GenerateExchangeLines
from threedi_schematisation_editor.processing.algorithms_conversion import (
ImportCulverts,
- ImportManholes,
ImportOrifices,
ImportPipes,
ImportWeirs,
@@ -48,7 +47,6 @@ def loadAlgorithms(self):
ImportOrifices(),
ImportWeirs(),
ImportPipes(),
- ImportManholes(),
BottomLevelCalculator(),
]
for alg in self.algorithms_list:
diff --git a/threedi_schematisation_editor/processing/alghorithms_inflow.py b/threedi_schematisation_editor/processing/alghorithms_inflow.py
index b71c584..032c6f6 100644
--- a/threedi_schematisation_editor/processing/alghorithms_inflow.py
+++ b/threedi_schematisation_editor/processing/alghorithms_inflow.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
from operator import itemgetter
from qgis.core import (
@@ -21,7 +21,7 @@
class LinkSurfacesWithNodes(QgsProcessingAlgorithm):
- """Link (impervious) surfaces to connection nodes."""
+ """Link (DWF) surfaces to connection nodes."""
SURFACE_LAYER = "SURFACE_LAYER"
SELECTED_SURFACES = "SELECTED_SURFACES"
@@ -44,7 +44,7 @@ def name(self):
return "threedi_map_surfaces_to_connection_nodes"
def displayName(self):
- return self.tr("Map (impervious) surfaces to connection nodes")
+ return self.tr("Map surfaces to connection nodes")
def group(self):
return self.tr("Inflow")
@@ -55,14 +55,14 @@ def groupId(self):
def shortHelpString(self):
return self.tr(
"""
- Connect (impervious) surfaces to the sewer system by creating (impervious) surface map features. The new features are added to the (impervious) surface layer directly.
- For each (impervious) surface, the nearest pipe is found; the surface is mapped to the the nearest of this pipe's connection nodes.
+ Connect surfaces to the sewer system by creating surface map features. The new features are added to the surface layer directly.
+ For each surface, the nearest pipe is found; the surface is mapped to the the nearest of this pipe's connection nodes.
In some cases, you may want to prefer e.g. stormwater drains over combined sewers. This can be done by setting the stormwater sewer preference to a value greater than zero.
Parameters
- (Impervious) surface layer
- Surface or Impervious surface layer that is added to the project with the 3Di Schematisation Editor.
- (Impervious) surface map layer
- Surface map or Impervious surface map layer that is added to the project with the 3Di Schematisation Editor.
+ (DWF) surface layer
+ Surface or DWF surface layer that is added to the project with the 3Di Schematisation Editor.
+ (DWF) surface map layer
+ Surface map or DWF surface map layer that is added to the project with the 3Di Schematisation Editor.
Pipe layer
Pipe layer that is added to the project with the 3Di Schematisation Editor.
Connection node layer
@@ -70,11 +70,11 @@ def shortHelpString(self):
Sewerage types
Only pipes of the selected sewerage types will be used in the algorithm
Stormwater sewer preference
- This value (in meters) will be subtracted from the distance between the (impervious) surface and the stormwater drain. For example: there is a combined sewer within 10 meters from the (impervious) surface, and a stormwater drain within 11 meters; if the stormwater sewer preference is 2 m, the algorithm will use 11 - 2 = 9 m as distance to the stormwater sewer, so the (impervious) surface will be mapped to one of the stormwater drain's connection nodes, instead of to the combined sewer's connection nodes.
+ This value (in meters) will be subtracted from the distance between the surface and the stormwater drain. For example: there is a combined sewer within 10 meters from the surface, and a stormwater drain within 11 meters; if the stormwater sewer preference is 2 m, the algorithm will use 11 - 2 = 9 m as distance to the stormwater sewer, so the surface will be mapped to one of the stormwater drain's connection nodes, instead of to the combined sewer's connection nodes.
Sanitary sewer preference
- This value (in meters) will be subtracted from the distance between the (impervious) surface and the sanitary sewer. See 'stormwater sewer preference' for further explanation.
+ This value (in meters) will be subtracted from the distance between the surface and the sanitary sewer. See 'stormwater sewer preference' for further explanation.
Search distance
- Only pipes within search distance (m) from the (impervious) surface will be used in the algorithm.
+ Only pipes within search distance (m) from the surface will be used in the algorithm.
"""
)
@@ -82,23 +82,23 @@ def initAlgorithm(self, config=None):
self.addParameter(
QgsProcessingParameterVectorLayer(
self.SURFACE_LAYER,
- self.tr("(Impervious) surface layer"),
+ self.tr("Surface layer"),
[QgsProcessing.TypeVectorPolygon],
- defaultValue="Impervious Surface",
+ defaultValue="Surface",
)
)
self.addParameter(
QgsProcessingParameterBoolean(
self.SELECTED_SURFACES,
- self.tr("Selected (impervious) surfaces only"),
+ self.tr("Selected surfaces only"),
)
)
self.addParameter(
QgsProcessingParameterVectorLayer(
self.SURFACE_MAP_LAYER,
- self.tr("(Impervious) surface map layer"),
+ self.tr("Surface map layer"),
[QgsProcessing.TypeVectorLine],
- defaultValue="Impervious surface map",
+ defaultValue="Surface map",
)
)
self.addParameter(
@@ -120,7 +120,7 @@ def initAlgorithm(self, config=None):
self.NODE_LAYER,
self.tr("Connection node layer"),
[QgsProcessing.TypeVectorPoint],
- defaultValue="Connection Node",
+ defaultValue="Connection node",
)
)
self.addParameter(
@@ -215,9 +215,8 @@ def processAlgorithm(self, parameters, context, feedback):
step += 1
surface_map_feats = []
surface_map_fields = surface_map_lyr.fields()
- surface_map_field_names = {fld.name() for fld in surface_map_fields}
next_surface_map_id = get_next_feature_id(surface_map_lyr)
- surface_id_field = "surface_id" if "surface_id" in surface_map_field_names else "impervious_surface_id"
+ surface_id_field = "surface_id"
for surface_id, surface_pipes in surface_to_pipes_distances.items():
if feedback.isCanceled():
return {}
@@ -231,8 +230,8 @@ def processAlgorithm(self, parameters, context, feedback):
surface_centroid = surface_geom.centroid()
pipe_id, surface_pipe_distance = surface_pipes[0]
pipe_feat = pipe_features[pipe_id]
- start_node_id = pipe_feat["connection_node_start_id"]
- end_node_id = pipe_feat["connection_node_end_id"]
+ start_node_id = pipe_feat["connection_node_id_start"]
+ end_node_id = pipe_feat["connection_node_id_end"]
start_node = get_feature_by_id(node_lyr, start_node_id)
end_node = get_feature_by_id(node_lyr, end_node_id)
start_node_geom = start_node.geometry()
diff --git a/threedi_schematisation_editor/processing/algorithms_1d.py b/threedi_schematisation_editor/processing/algorithms_1d.py
index 14b82e2..1a61c8e 100644
--- a/threedi_schematisation_editor/processing/algorithms_1d.py
+++ b/threedi_schematisation_editor/processing/algorithms_1d.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
from collections import defaultdict
from qgis.core import (
@@ -14,10 +14,10 @@
class BottomLevelCalculator(QgsProcessingAlgorithm):
- """Calculate manhole bottom level from pipes."""
+ """Calculate connection node manhole bottom level from pipes."""
- MANHOLE_LAYER = "MANHOLE_LAYER"
- SELECTED_MANHOLES = "SELECTED_MANHOLES"
+ CONNECTION_NODE_LAYER = "CONNECTION_NODE_LAYER"
+ SELECTED_CONNECTION_NODES = "SELECTED_CONNECTION_NODES"
PIPE_LAYER = "PIPE_LAYER"
SELECTED_PIPES = "SELECTED_PIPES"
OVERWRITE_LEVELS = "OVERWRITE_LEVELS"
@@ -44,12 +44,12 @@ def groupId(self):
def shortHelpString(self):
return self.tr(
"""
- Calculate manhole bottom level from the invert levels of pipes or culverts.
- For each manhole, the algorithm determines which sides of which pipes (or culverts) are connected to it, and what the invert level is at that side. It than takes the lowest of these invert levels as bottom level for the manhole.
+ Calculate connection node manhole bottom level from the invert levels of pipes or culverts.
+ For each connection node manhole, the algorithm determines which sides of which pipes (or culverts) are connected to it, and what the invert level is at that side. It than takes the lowest of these invert levels as bottom level for the manhole.
Parameters
- Manhole layer
- Manhole layer that is added to the project with the 3Di Schematisation Editor.
- If "Selected manholes only" is checked, only the selected manholes will be used in the algorithm.
+ Connection node layer
+ Connection node layer that is added to the project with the 3Di Schematisation Editor.
+ If "Selected connection nodes only" is checked, only the selected manholes will be used in the algorithm.
Pipe layer
Pipe or Culvert layer that is added to the project with the 3Di Schematisation Editor.
If "Selected pipes only" is checked, only the selected pipes will be used in the algorithm.
@@ -64,16 +64,16 @@ def shortHelpString(self):
def initAlgorithm(self, config=None):
self.addParameter(
QgsProcessingParameterVectorLayer(
- self.MANHOLE_LAYER,
- self.tr("Manhole layer"),
+ self.CONNECTION_NODE_LAYER,
+ self.tr("Connection node layer"),
[QgsProcessing.TypeVectorPoint],
- defaultValue="Manhole",
+ defaultValue="Connection node",
)
)
self.addParameter(
QgsProcessingParameterBoolean(
- self.SELECTED_MANHOLES,
- self.tr("Selected manholes only"),
+ self.SELECTED_CONNECTION_NODES,
+ self.tr("Selected connection node manholes only"),
)
)
self.addParameter(
@@ -106,10 +106,10 @@ def initAlgorithm(self, config=None):
)
def processAlgorithm(self, parameters, context, feedback):
- manhole_lyr = self.parameterAsLayer(parameters, self.MANHOLE_LAYER, context)
- if manhole_lyr is None:
- raise QgsProcessingException(self.invalidSourceError(parameters, self.MANHOLE_LAYER))
- selected_manholes = self.parameterAsBool(parameters, self.SELECTED_MANHOLES, context)
+ connection_node_lyr = self.parameterAsLayer(parameters, self.CONNECTION_NODE_LAYER, context)
+ if connection_node_lyr is None:
+ raise QgsProcessingException(self.invalidSourceError(parameters, self.CONNECTION_NODE_LAYER))
+ selected_manhole_nodes = self.parameterAsBool(parameters, self.SELECTED_CONNECTION_NODES, context)
pipe_lyr = self.parameterAsLayer(parameters, self.PIPE_LAYER, context)
if pipe_lyr is None:
raise QgsProcessingException(self.invalidSourceError(parameters, self.PIPE_LAYER))
@@ -121,27 +121,31 @@ def processAlgorithm(self, parameters, context, feedback):
num_pipes = pipe_lyr.selectedFeatureCount() if selected_pipes else pipe_lyr.featureCount()
processed_pipes = 0
for pipe_feat in pipe_lyr.selectedFeatures() if selected_pipes else pipe_lyr.getFeatures():
- pipe_start_node_id = pipe_feat["connection_node_start_id"]
- pipe_end_node_id = pipe_feat["connection_node_end_id"]
- invert_level_start_point = pipe_feat["invert_level_start_point"]
- invert_level_end_point = pipe_feat["invert_level_end_point"]
- if invert_level_start_point != NULL:
- node_adjacent_invert_levels[pipe_start_node_id].add(invert_level_start_point)
- if invert_level_end_point != NULL:
- node_adjacent_invert_levels[pipe_end_node_id].add(invert_level_end_point)
+ pipe_start_node_id = pipe_feat["connection_node_id_start"]
+ pipe_end_node_id = pipe_feat["connection_node_id_end"]
+ invert_level_start = pipe_feat["invert_level_start"]
+ invert_level_end = pipe_feat["invert_level_end"]
+ if invert_level_start != NULL:
+ node_adjacent_invert_levels[pipe_start_node_id].add(invert_level_start)
+ if invert_level_end != NULL:
+ node_adjacent_invert_levels[pipe_end_node_id].add(invert_level_end)
processed_pipes += 1
feedback.setProgress(100 / 3 * processed_pipes / num_pipes)
if feedback.isCanceled():
return {}
bottom_level_changes = {}
- num_manholes = manhole_lyr.selectedFeatureCount() if selected_manholes else manhole_lyr.featureCount()
- processed_manholes = 0
- for manhole_feat in manhole_lyr.selectedFeatures() if selected_manholes else manhole_lyr.getFeatures():
- manhole_fid = manhole_feat.id()
- node_id = manhole_feat["connection_node_id"]
+ num_manhole_nodes = (
+ connection_node_lyr.selectedFeatureCount() if selected_manhole_nodes else connection_node_lyr.featureCount()
+ )
+ processed_nodes = 0
+ for node_feat in (
+ connection_node_lyr.selectedFeatures() if selected_manhole_nodes else connection_node_lyr.getFeatures()
+ ):
+ node_fid = node_feat.id()
+ node_id = node_feat["id"]
if not node_id:
continue
- bottom_level = manhole_feat["bottom_level"]
+ bottom_level = node_feat["bottom_level"]
if bottom_level != NULL and not overwrite_levels:
continue
invert_levels = node_adjacent_invert_levels[node_id]
@@ -151,24 +155,24 @@ def processAlgorithm(self, parameters, context, feedback):
if bottom_level != NULL:
if min_invert_level > bottom_level and do_not_raise_levels:
continue
- bottom_level_changes[manhole_fid] = min_invert_level
- processed_manholes += 1
- feedback.setProgress(100 / 3 + 100 / 3 * processed_manholes / num_manholes)
+ bottom_level_changes[node_fid] = min_invert_level
+ processed_nodes += 1
+ feedback.setProgress(100 / 3 + 100 / 3 * processed_nodes / num_manhole_nodes)
if feedback.isCanceled():
return {}
if bottom_level_changes:
- bottom_level_field_idx = manhole_lyr.fields().lookupField("bottom_level")
- manhole_lyr.startEditing()
- for i, (manhole_fid, bottom_level) in enumerate(bottom_level_changes.items()):
+ bottom_level_field_idx = connection_node_lyr.fields().lookupField("bottom_level")
+ connection_node_lyr.startEditing()
+ for i, (node_fid, bottom_level) in enumerate(bottom_level_changes.items()):
if feedback.isCanceled():
return {}
- manhole_lyr.changeAttributeValue(manhole_fid, bottom_level_field_idx, bottom_level)
+ connection_node_lyr.changeAttributeValue(node_fid, bottom_level_field_idx, bottom_level)
feedback.setProgress(200 / 3 + 100 / 3 * (i + 1) / len(bottom_level_changes))
if feedback.isCanceled():
return {}
- success = manhole_lyr.commitChanges()
+ success = connection_node_lyr.commitChanges()
if not success:
- commit_errors = manhole_lyr.commitErrors()
+ commit_errors = connection_node_lyr.commitErrors()
commit_errors_message = "\n".join(commit_errors)
feedback.reportError(commit_errors_message)
return {}
diff --git a/threedi_schematisation_editor/processing/algorithms_1d2d.py b/threedi_schematisation_editor/processing/algorithms_1d2d.py
index 5876c7b..6a129eb 100644
--- a/threedi_schematisation_editor/processing/algorithms_1d2d.py
+++ b/threedi_schematisation_editor/processing/algorithms_1d2d.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
from qgis.core import (
Qgis,
QgsFeature,
@@ -11,7 +11,7 @@
)
from qgis.PyQt.QtCore import QCoreApplication
-from threedi_schematisation_editor.enumerators import CalculationType
+from threedi_schematisation_editor.enumerators import ExchangeTypeChannel
from threedi_schematisation_editor.utils import get_features_by_expression, get_next_feature_id
@@ -46,7 +46,7 @@ def shortHelpString(self):
This processing algorithm generates exchange lines for (a selection of) channels. The resulting exchange line's geometry is a copy of the input channel's geometry, at user specified distance from that channel (the GIS term for this is 'offset curve'). The resulting exchange lines is added to the exchange line layer, and the attribute 'channel_id' refers to the channel it was derived from.
Parameters
Input channel layer
- Usually this is the Channel layer that is added to the project with the 3Di Schematisation Editor. Technically, any layer with a line geometry and the fields 'id' and 'calculation_type' can be used as input.
+ Usually this is the Channel layer that is added to the project with the 3Di Schematisation Editor. Technically, any layer with a line geometry and the fields 'id' and 'exchange_type' can be used as input.
Distance
Offset distance in meters. A positive value will place the output exchange line to the left of the line, negative values will place it to the right.
Exchange lines layer
@@ -81,11 +81,11 @@ def checkParameterValues(self, parameters, context):
if success:
invalid_parameters_messages = []
channels = self.parameterAsSource(parameters, self.INPUT_CHANNELS, context)
- required_channel_fields = {"id", "calculation_type"}
+ required_channel_fields = {"id", "exchange_type"}
channels_field_names = {f.name() for f in channels.fields()}
if not required_channel_fields.issubset(channels_field_names):
invalid_parameters_messages.append(
- "Channel layer is missing required fields ('id' and/or 'calculation_type')"
+ "Channel layer is missing required fields ('id' and/or 'exchange_type')"
)
offset_distance = self.parameterAsDouble(parameters, self.OFFSET_DISTANCE, context)
if offset_distance == 0:
@@ -112,15 +112,15 @@ def processAlgorithm(self, parameters, context, feedback):
exchange_line_feats = []
exchange_lines_fields = exchange_lines_lyr.fields()
current_exchange_line_id = get_next_feature_id(exchange_lines_lyr)
- calculation_type_max_exchange_lines = {
- CalculationType.ISOLATED.value: 0,
- CalculationType.EMBEDDED.value: 0,
- CalculationType.CONNECTED.value: 1,
- CalculationType.DOUBLE_CONNECTED.value: 2,
+ exchange_type_max_exchange_lines = {
+ ExchangeTypeChannel.ISOLATED.value: 0,
+ ExchangeTypeChannel.EMBEDDED.value: 0,
+ ExchangeTypeChannel.CONNECTED.value: 1,
+ ExchangeTypeChannel.DOUBLE_CONNECTED.value: 2,
}
error_template = (
- "Error: channel {} with calculation type {} ({}) already has a maximum of {} exchange lines. "
- "Change the calculation type or remove exchange lines for this channel and try again."
+ "Error: channel {} with exchange type {} ({}) already has a maximum of {} exchange lines. "
+ "Change the exchange type or remove exchange lines for this channel and try again."
)
for channel_feat in channels.getFeatures():
channel_fid = channel_feat.id()
@@ -128,18 +128,18 @@ def processAlgorithm(self, parameters, context, feedback):
if not channel_id:
feedback.reportError(f"Error: invalid channel ID. Processing feature with FID {channel_fid} skipped.")
continue
- calculation_type = channel_feat["calculation_type"]
- if calculation_type not in calculation_type_max_exchange_lines:
+ exchange_type = channel_feat["exchange_type"]
+ if exchange_type not in exchange_type_max_exchange_lines:
feedback.reportError(
- f"Error: invalid channel calculation type. Processing feature with FID {channel_fid} skipped."
+ f"Error: invalid channel exchange type. Processing feature with FID {channel_fid} skipped."
)
continue
- calculation_type_name = CalculationType(calculation_type).name
+ exchange_type_name = ExchangeTypeChannel(exchange_type).name
channel_expression_text = f'"channel_id" = {channel_id}'
channel_exchange_lines = list(get_features_by_expression(exchange_lines_lyr, channel_expression_text))
- calc_type_limit = calculation_type_max_exchange_lines[calculation_type]
+ calc_type_limit = exchange_type_max_exchange_lines[exchange_type]
if len(channel_exchange_lines) >= calc_type_limit:
- error_msg = error_template.format(channel_id, calculation_type, calculation_type_name, calc_type_limit)
+ error_msg = error_template.format(channel_id, exchange_type, exchange_type_name, calc_type_limit)
feedback.reportError(error_msg)
continue
channel_geom = channel_feat.geometry()
diff --git a/threedi_schematisation_editor/processing/algorithms_conversion.py b/threedi_schematisation_editor/processing/algorithms_conversion.py
index b4c80d5..d8213ba 100644
--- a/threedi_schematisation_editor/processing/algorithms_conversion.py
+++ b/threedi_schematisation_editor/processing/algorithms_conversion.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
import json
from qgis.core import (
@@ -14,7 +14,6 @@
from threedi_schematisation_editor.custom_tools import (
CulvertsImporter,
CulvertsIntegrator,
- ManholesImporter,
OrificesImporter,
OrificesIntegrator,
PipesImporter,
@@ -331,76 +330,3 @@ def postProcessAlgorithm(self, context, feedback):
for layer in QgsProject.instance().mapLayers().values():
layer.triggerRepaint()
return {}
-
-
-class ImportManholes(QgsProcessingAlgorithm):
- """Import manholes."""
-
- SOURCE_LAYER = "SOURCE_LAYER"
- IMPORT_CONFIG = "IMPORT_CONFIG"
- TARGET_GPKG = "TARGET_GPKG"
-
- def tr(self, string):
- return QCoreApplication.translate("Processing", string)
-
- def createInstance(self):
- return ImportManholes()
-
- def name(self):
- return "threedi_import_manholes"
-
- def displayName(self):
- return self.tr("Import manholes")
-
- def group(self):
- return self.tr("Conversion")
-
- def groupId(self):
- return "conversion"
-
- def shortHelpString(self):
- return self.tr("""Import manholes from the external source layer.""")
-
- def initAlgorithm(self, config=None):
- source_layer = QgsProcessingParameterFeatureSource(
- self.SOURCE_LAYER,
- self.tr("Source manholes layer"),
- [QgsProcessing.TypeVectorPoint],
- )
- self.addParameter(source_layer)
- import_config_file = QgsProcessingParameterFile(
- self.IMPORT_CONFIG,
- self.tr("Manholes import configuration file"),
- extension="json",
- behavior=QgsProcessingParameterFile.File,
- )
- self.addParameter(import_config_file)
- target_gpkg = QgsProcessingParameterFile(
- self.TARGET_GPKG,
- self.tr("Target Schematisation Editor GeoPackage file"),
- extension="gpkg",
- behavior=QgsProcessingParameterFile.File,
- )
- self.addParameter(target_gpkg)
-
- def processAlgorithm(self, parameters, context, feedback):
- source_layer = self.parameterAsSource(parameters, self.SOURCE_LAYER, context)
- if source_layer is None:
- raise QgsProcessingException(self.invalidSourceError(parameters, self.SOURCE_LAYER))
- import_config_file = self.parameterAsFile(parameters, self.IMPORT_CONFIG, context)
- if import_config_file is None:
- raise QgsProcessingException(self.invalidSourceError(parameters, self.IMPORT_CONFIG))
- target_gpkg = self.parameterAsFile(parameters, self.TARGET_GPKG, context)
- if target_gpkg is None:
- raise QgsProcessingException(self.invalidSourceError(parameters, self.TARGET_GPKG))
- with open(import_config_file) as import_config_json:
- import_config = json.loads(import_config_json.read())
- manholes_importer = ManholesImporter(source_layer, target_gpkg, import_config)
- manholes_importer.import_structures(context=context)
- manholes_importer.commit_pending_changes()
- return {}
-
- def postProcessAlgorithm(self, context, feedback):
- for layer in QgsProject.instance().mapLayers().values():
- layer.triggerRepaint()
- return {}
diff --git a/threedi_schematisation_editor/processing/config/import_culvert.json b/threedi_schematisation_editor/processing/config/import_culvert.json
index d525b74..508326b 100644
--- a/threedi_schematisation_editor/processing/config/import_culvert.json
+++ b/threedi_schematisation_editor/processing/config/import_culvert.json
@@ -17,7 +17,7 @@
"display_name": {
"method": "ignore"
},
- "calculation_type": {
+ "exchange_type": {
"method": "source_attribute",
"source_attribute": "kdu_open",
"value_map": {
diff --git a/threedi_schematisation_editor/styles/vector/1d_boundary_condition/default.qml b/threedi_schematisation_editor/styles/vector/1d_boundary_condition/default.qml
deleted file mode 100644
index 0dc487d..0000000
--- a/threedi_schematisation_editor/styles/vector/1d_boundary_condition/default.qml
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-
- 1
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ROWID
-
- 0
-
diff --git a/threedi_schematisation_editor/styles/vector/1d_lateral/default.qml b/threedi_schematisation_editor/styles/vector/1d_lateral/default.qml
deleted file mode 100644
index a33ebdb..0000000
--- a/threedi_schematisation_editor/styles/vector/1d_lateral/default.qml
+++ /dev/null
@@ -1,241 +0,0 @@
-
-
-
- 1
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
-
- 0
- .
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ROWID
-
- 0
-
diff --git a/threedi_schematisation_editor/styles/vector/2d_boundary_condition/default.qml b/threedi_schematisation_editor/styles/vector/2d_boundary_condition/default.qml
deleted file mode 100644
index 8054950..0000000
--- a/threedi_schematisation_editor/styles/vector/2d_boundary_condition/default.qml
+++ /dev/null
@@ -1,272 +0,0 @@
-
-
-
- 1
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "display_name"
-
- 1
-
diff --git a/threedi_schematisation_editor/styles/vector/2d_lateral/default.qml b/threedi_schematisation_editor/styles/vector/2d_lateral/default.qml
deleted file mode 100644
index 7ad09f7..0000000
--- a/threedi_schematisation_editor/styles/vector/2d_lateral/default.qml
+++ /dev/null
@@ -1,242 +0,0 @@
-
-
-
- 1
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "id"
-
- 0
-
diff --git a/threedi_schematisation_editor/styles/vector/aggregation_settings/default.qml b/threedi_schematisation_editor/styles/vector/aggregation_settings/default.qml
index 5c07f1f..7ae57ac 100644
--- a/threedi_schematisation_editor/styles/vector/aggregation_settings/default.qml
+++ b/threedi_schematisation_editor/styles/vector/aggregation_settings/default.qml
@@ -150,7 +150,7 @@
-
+
@@ -169,17 +169,17 @@
-
+
-
+
-
+
@@ -189,7 +189,7 @@
-
+
@@ -199,7 +199,7 @@
-
+
@@ -214,7 +214,7 @@
-
+
@@ -251,7 +251,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -263,7 +263,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -273,7 +273,7 @@ def my_form_open(dialog, layer, feature):
-
+
diff --git a/threedi_schematisation_editor/styles/vector/boundary_condition_1d/default.qml b/threedi_schematisation_editor/styles/vector/boundary_condition_1d/default.qml
new file mode 100644
index 0000000..640ca1e
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/boundary_condition_1d/default.qml
@@ -0,0 +1,580 @@
+
+
+
+ 1
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\boundary_condition_1d.ui
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROWID
+
+ 0
+
diff --git a/threedi_schematisation_editor/styles/vector/1d_boundary_condition/timeseries label.qml b/threedi_schematisation_editor/styles/vector/boundary_condition_1d/timeseries label.qml
similarity index 86%
rename from threedi_schematisation_editor/styles/vector/1d_boundary_condition/timeseries label.qml
rename to threedi_schematisation_editor/styles/vector/boundary_condition_1d/timeseries label.qml
index acc3edc..4a9a147 100644
--- a/threedi_schematisation_editor/styles/vector/1d_boundary_condition/timeseries label.qml
+++ b/threedi_schematisation_editor/styles/vector/boundary_condition_1d/timeseries label.qml
@@ -37,7 +37,7 @@
-
+
@@ -136,7 +136,7 @@
-
+
@@ -181,9 +181,9 @@
-
-
-
+
+
+
@@ -213,13 +213,13 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
@@ -227,7 +227,7 @@ def my_form_open(dialog, layer, feature):
-
+
diff --git a/threedi_schematisation_editor/styles/vector/boundary_condition_2d/default.qml b/threedi_schematisation_editor/styles/vector/boundary_condition_2d/default.qml
new file mode 100644
index 0000000..17f041c
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/boundary_condition_2d/default.qml
@@ -0,0 +1,566 @@
+
+
+
+ 1
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\boundary_condition_2d.ui
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "display_name"
+
+ 1
+
diff --git a/threedi_schematisation_editor/styles/vector/2d_boundary_condition/timeseries label.qml b/threedi_schematisation_editor/styles/vector/boundary_condition_2d/timeseries label.qml
similarity index 88%
rename from threedi_schematisation_editor/styles/vector/2d_boundary_condition/timeseries label.qml
rename to threedi_schematisation_editor/styles/vector/boundary_condition_2d/timeseries label.qml
index 4254161..5a9f2d1 100644
--- a/threedi_schematisation_editor/styles/vector/2d_boundary_condition/timeseries label.qml
+++ b/threedi_schematisation_editor/styles/vector/boundary_condition_2d/timeseries label.qml
@@ -40,7 +40,7 @@
-
+
@@ -176,7 +176,7 @@
-
+
@@ -203,27 +203,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -234,7 +234,7 @@
-
+
@@ -270,18 +270,18 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/channel/calculation point distance.qml b/threedi_schematisation_editor/styles/vector/channel/calculation point distance.qml
index 0e94c41..b4a984c 100644
--- a/threedi_schematisation_editor/styles/vector/channel/calculation point distance.qml
+++ b/threedi_schematisation_editor/styles/vector/channel/calculation point distance.qml
@@ -228,7 +228,7 @@
-
+
@@ -288,7 +288,7 @@
-
+
@@ -541,7 +541,7 @@
-
+
@@ -563,7 +563,7 @@
-
+
@@ -680,8 +680,8 @@
-
-
+
+
@@ -694,8 +694,8 @@
-
-
+
+
@@ -708,8 +708,8 @@
-
-
+
+
@@ -722,8 +722,8 @@
-
-
+
+
@@ -741,8 +741,8 @@
-
-
+
+
@@ -791,12 +791,12 @@
-
+
-
+
@@ -830,12 +830,12 @@
-
+
-
+
@@ -844,12 +844,12 @@
-
+
-
+
@@ -858,12 +858,12 @@
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/channel/calculation type.qml b/threedi_schematisation_editor/styles/vector/channel/calculation type.qml
index 18a8075..b4c23c4 100644
--- a/threedi_schematisation_editor/styles/vector/channel/calculation type.qml
+++ b/threedi_schematisation_editor/styles/vector/channel/calculation type.qml
@@ -144,7 +144,7 @@
-
+
@@ -566,7 +566,7 @@
-
+
@@ -588,7 +588,7 @@
-
+
@@ -705,8 +705,8 @@
-
-
+
+
@@ -719,8 +719,8 @@
-
-
+
+
@@ -733,8 +733,8 @@
-
-
+
+
@@ -747,8 +747,8 @@
-
-
+
+
@@ -766,8 +766,8 @@
-
-
+
+
@@ -816,12 +816,12 @@
-
+
-
+
@@ -855,12 +855,12 @@
-
+
-
+
@@ -869,12 +869,12 @@
-
+
-
+
@@ -883,12 +883,12 @@
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/channel/code.qml b/threedi_schematisation_editor/styles/vector/channel/code.qml
index 9f2766c..3cee51c 100644
--- a/threedi_schematisation_editor/styles/vector/channel/code.qml
+++ b/threedi_schematisation_editor/styles/vector/channel/code.qml
@@ -458,7 +458,7 @@
-
+
@@ -483,7 +483,7 @@
-
+
@@ -600,8 +600,8 @@
-
-
+
+
@@ -614,8 +614,8 @@
-
-
+
+
@@ -628,8 +628,8 @@
-
-
+
+
@@ -642,8 +642,8 @@
-
-
+
+
@@ -661,8 +661,8 @@
-
-
+
+
@@ -711,12 +711,12 @@
-
+
-
+
@@ -750,12 +750,12 @@
-
+
-
+
@@ -764,12 +764,12 @@
-
+
-
+
@@ -778,12 +778,12 @@
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/channel/default.qml b/threedi_schematisation_editor/styles/vector/channel/default.qml
index 14f6dbd..a11ad95 100644
--- a/threedi_schematisation_editor/styles/vector/channel/default.qml
+++ b/threedi_schematisation_editor/styles/vector/channel/default.qml
@@ -328,7 +328,7 @@
-
+
@@ -353,7 +353,7 @@
-
+
@@ -470,8 +470,8 @@
-
-
+
+
@@ -484,8 +484,8 @@
-
-
+
+
@@ -498,8 +498,8 @@
-
-
+
+
@@ -512,8 +512,8 @@
-
-
+
+
@@ -531,8 +531,8 @@
-
-
+
+
@@ -581,12 +581,12 @@
-
+
-
+
@@ -620,12 +620,12 @@
-
+
-
+
@@ -634,12 +634,12 @@
-
+
-
+
@@ -648,12 +648,12 @@
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/channel/drawing direction.qml b/threedi_schematisation_editor/styles/vector/channel/drawing direction.qml
index bdc9b89..4c5b73c 100644
--- a/threedi_schematisation_editor/styles/vector/channel/drawing direction.qml
+++ b/threedi_schematisation_editor/styles/vector/channel/drawing direction.qml
@@ -400,7 +400,7 @@
-
+
@@ -425,7 +425,7 @@
-
+
@@ -542,8 +542,8 @@
-
-
+
+
@@ -556,8 +556,8 @@
-
-
+
+
@@ -570,8 +570,8 @@
-
-
+
+
@@ -584,8 +584,8 @@
-
-
+
+
@@ -603,8 +603,8 @@
-
-
+
+
@@ -653,12 +653,12 @@
-
+
-
+
@@ -692,12 +692,12 @@
-
+
-
+
@@ -706,12 +706,12 @@
-
+
-
+
@@ -720,12 +720,12 @@
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/connection_node/default.qml b/threedi_schematisation_editor/styles/vector/connection_node/default.qml
index 559f6b1..3e8a9b7 100644
--- a/threedi_schematisation_editor/styles/vector/connection_node/default.qml
+++ b/threedi_schematisation_editor/styles/vector/connection_node/default.qml
@@ -164,7 +164,7 @@
-
+
@@ -197,28 +197,28 @@
-
+
-
+
-
+
-
+
@@ -233,7 +233,7 @@
-
+
@@ -241,7 +241,7 @@
-
+
@@ -249,7 +249,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/connection_node/initial water level.qml b/threedi_schematisation_editor/styles/vector/connection_node/initial water level.qml
index 60c230f..b5d4893 100644
--- a/threedi_schematisation_editor/styles/vector/connection_node/initial water level.qml
+++ b/threedi_schematisation_editor/styles/vector/connection_node/initial water level.qml
@@ -2,8 +2,8 @@
-
-
+
+
@@ -68,7 +68,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/connection_node/storage area.qml b/threedi_schematisation_editor/styles/vector/connection_node/storage area.qml
index 667a023..74481b7 100644
--- a/threedi_schematisation_editor/styles/vector/connection_node/storage area.qml
+++ b/threedi_schematisation_editor/styles/vector/connection_node/storage area.qml
@@ -398,7 +398,7 @@
-
+
@@ -446,7 +446,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -454,14 +454,14 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/cross_section_definition/default.qml b/threedi_schematisation_editor/styles/vector/cross_section_definition/default.qml
index cfb1a20..4c4111c 100644
--- a/threedi_schematisation_editor/styles/vector/cross_section_definition/default.qml
+++ b/threedi_schematisation_editor/styles/vector/cross_section_definition/default.qml
@@ -109,7 +109,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/cross_section_location/cross-section.qml b/threedi_schematisation_editor/styles/vector/cross_section_location/cross-section.qml
index 891afe3..e785f77 100644
--- a/threedi_schematisation_editor/styles/vector/cross_section_location/cross-section.qml
+++ b/threedi_schematisation_editor/styles/vector/cross_section_location/cross-section.qml
@@ -643,7 +643,7 @@
-
+
@@ -675,7 +675,7 @@
-
+
@@ -695,7 +695,7 @@
-
+
@@ -715,7 +715,7 @@
-
+
@@ -735,7 +735,7 @@
-
+
@@ -760,7 +760,7 @@
-
+
@@ -860,7 +860,7 @@
-
+
@@ -885,7 +885,7 @@
-
+
@@ -906,7 +906,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/cross_section_location/default.qml b/threedi_schematisation_editor/styles/vector/cross_section_location/default.qml
index f65d5ca..d357ff1 100644
--- a/threedi_schematisation_editor/styles/vector/cross_section_location/default.qml
+++ b/threedi_schematisation_editor/styles/vector/cross_section_location/default.qml
@@ -519,7 +519,7 @@
-
+
@@ -554,7 +554,7 @@
-
+
@@ -574,7 +574,7 @@
-
+
@@ -594,7 +594,7 @@
-
+
@@ -614,7 +614,7 @@
-
+
@@ -639,7 +639,7 @@
-
+
@@ -739,7 +739,7 @@
-
+
@@ -764,7 +764,7 @@
-
+
@@ -785,7 +785,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/cross_section_location/levels.qml b/threedi_schematisation_editor/styles/vector/cross_section_location/levels.qml
index 18050d5..8357f99 100644
--- a/threedi_schematisation_editor/styles/vector/cross_section_location/levels.qml
+++ b/threedi_schematisation_editor/styles/vector/cross_section_location/levels.qml
@@ -642,7 +642,7 @@
-
+
@@ -674,7 +674,7 @@
-
+
@@ -694,7 +694,7 @@
-
+
@@ -714,7 +714,7 @@
-
+
@@ -734,7 +734,7 @@
-
+
@@ -759,7 +759,7 @@
-
+
@@ -859,7 +859,7 @@
-
+
@@ -884,7 +884,7 @@
-
+
@@ -905,7 +905,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/culvert/calculation type.qml b/threedi_schematisation_editor/styles/vector/culvert/calculation type.qml
index 698fd22..2e2524a 100644
--- a/threedi_schematisation_editor/styles/vector/culvert/calculation type.qml
+++ b/threedi_schematisation_editor/styles/vector/culvert/calculation type.qml
@@ -1,6 +1,6 @@
-
+
@@ -556,28 +556,28 @@
-
+
-
+
-
+
-
+
@@ -663,12 +663,12 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
-
-
+
+
@@ -690,23 +690,23 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
-
-
+
+
@@ -714,34 +714,34 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
@@ -749,13 +749,13 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
+
+
diff --git a/threedi_schematisation_editor/styles/vector/culvert/cross-section.qml b/threedi_schematisation_editor/styles/vector/culvert/cross-section.qml
index 5d6684d..45fea7a 100644
--- a/threedi_schematisation_editor/styles/vector/culvert/cross-section.qml
+++ b/threedi_schematisation_editor/styles/vector/culvert/cross-section.qml
@@ -1042,7 +1042,7 @@
-
+
@@ -1067,7 +1067,7 @@
-
+
@@ -1081,7 +1081,7 @@
-
+
@@ -1095,7 +1095,7 @@
-
+
@@ -1287,10 +1287,10 @@
-
-
-
-
+
+
+
+
@@ -1308,10 +1308,10 @@
-
-
-
-
+
+
+
+
@@ -1329,10 +1329,10 @@
-
-
-
-
+
+
+
+
@@ -1350,10 +1350,10 @@
-
-
-
-
+
+
+
+
@@ -1376,10 +1376,10 @@
-
-
-
-
+
+
+
+
@@ -1412,12 +1412,12 @@
-
-
+
+
-
-
+
+
@@ -1439,7 +1439,7 @@
-
+
@@ -1450,18 +1450,18 @@
-
+
-
-
+
+
-
+
@@ -1472,17 +1472,17 @@
-
+
-
-
+
+
-
+
@@ -1493,13 +1493,13 @@
-
+
-
-
+
+
diff --git a/threedi_schematisation_editor/styles/vector/culvert/default.qml b/threedi_schematisation_editor/styles/vector/culvert/default.qml
index a6d8289..b986fad 100644
--- a/threedi_schematisation_editor/styles/vector/culvert/default.qml
+++ b/threedi_schematisation_editor/styles/vector/culvert/default.qml
@@ -383,7 +383,7 @@
-
+
@@ -397,7 +397,7 @@
-
+
@@ -411,7 +411,7 @@
-
+
@@ -425,7 +425,7 @@
-
+
@@ -572,12 +572,12 @@
-
-
+
+
-
-
+
+
@@ -599,7 +599,7 @@
-
+
@@ -610,18 +610,18 @@
-
+
-
-
+
+
-
+
@@ -632,13 +632,13 @@
-
+
-
-
+
+
diff --git a/threedi_schematisation_editor/styles/vector/culvert/drawing direction.qml b/threedi_schematisation_editor/styles/vector/culvert/drawing direction.qml
index 258f06c..2a463db 100644
--- a/threedi_schematisation_editor/styles/vector/culvert/drawing direction.qml
+++ b/threedi_schematisation_editor/styles/vector/culvert/drawing direction.qml
@@ -55,7 +55,7 @@
-
+
@@ -186,28 +186,28 @@
-
+
-
+
-
+
-
+
@@ -293,12 +293,12 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
-
-
+
+
@@ -320,23 +320,23 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
-
-
+
+
@@ -344,34 +344,34 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
@@ -379,13 +379,13 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
+
+
diff --git a/threedi_schematisation_editor/styles/vector/culvert/levels and flow direction.qml b/threedi_schematisation_editor/styles/vector/culvert/levels and flow direction.qml
index d1cca86..4a6e532 100644
--- a/threedi_schematisation_editor/styles/vector/culvert/levels and flow direction.qml
+++ b/threedi_schematisation_editor/styles/vector/culvert/levels and flow direction.qml
@@ -55,7 +55,7 @@
-
+
@@ -93,12 +93,12 @@
-
+
-
+
@@ -175,7 +175,7 @@
-
+
@@ -287,7 +287,7 @@
-
+
@@ -430,28 +430,28 @@
-
+
-
+
-
+
-
+
@@ -537,12 +537,12 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
-
-
+
+
@@ -564,23 +564,23 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
-
-
+
+
@@ -588,34 +588,34 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
@@ -623,13 +623,13 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
+
+
diff --git a/threedi_schematisation_editor/styles/vector/dem_average_area/default.qml b/threedi_schematisation_editor/styles/vector/dem_average_area/default.qml
index 6b1403a..2b9b7d3 100644
--- a/threedi_schematisation_editor/styles/vector/dem_average_area/default.qml
+++ b/threedi_schematisation_editor/styles/vector/dem_average_area/default.qml
@@ -132,7 +132,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/dry_weather_flow/default.qml b/threedi_schematisation_editor/styles/vector/dry_weather_flow/default.qml
new file mode 100644
index 0000000..6be73a3
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/dry_weather_flow/default.qml
@@ -0,0 +1,510 @@
+
+
+
+ 1
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\dry_weather_flow.ui
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "display_name"
+
+ 2
+
diff --git a/threedi_schematisation_editor/styles/vector/dry_weather_flow_distribution/default.qml b/threedi_schematisation_editor/styles/vector/dry_weather_flow_distribution/default.qml
new file mode 100644
index 0000000..808a9bf
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/dry_weather_flow_distribution/default.qml
@@ -0,0 +1,271 @@
+
+
+
+ 1
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "description"
+
+ 4
+
diff --git a/threedi_schematisation_editor/styles/vector/dry_weather_flow_map/default.qml b/threedi_schematisation_editor/styles/vector/dry_weather_flow_map/default.qml
new file mode 100644
index 0000000..a753e31
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/dry_weather_flow_map/default.qml
@@ -0,0 +1,490 @@
+
+
+
+ 1
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "display_name"
+
+ 1
+
diff --git a/threedi_schematisation_editor/styles/vector/grid_refinement_area/default.qml b/threedi_schematisation_editor/styles/vector/grid_refinement_area/default.qml
index 0d9ead7..a5c6da5 100644
--- a/threedi_schematisation_editor/styles/vector/grid_refinement_area/default.qml
+++ b/threedi_schematisation_editor/styles/vector/grid_refinement_area/default.qml
@@ -34,7 +34,7 @@
-
+
@@ -94,7 +94,7 @@
-
+
@@ -162,7 +162,7 @@
-
+
@@ -362,7 +362,7 @@
-
+
@@ -378,28 +378,28 @@
-
+
-
+
-
+
-
+
-
+
@@ -411,7 +411,7 @@
-
+
@@ -448,7 +448,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -456,14 +456,14 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/grid_refinement_area/refinement level.qml b/threedi_schematisation_editor/styles/vector/grid_refinement_area/refinement level.qml
index 0b27fbe..c2b8194 100644
--- a/threedi_schematisation_editor/styles/vector/grid_refinement_area/refinement level.qml
+++ b/threedi_schematisation_editor/styles/vector/grid_refinement_area/refinement level.qml
@@ -28,7 +28,7 @@
-
+
@@ -83,7 +83,7 @@
-
+
@@ -141,7 +141,7 @@
-
+
@@ -156,7 +156,7 @@
-
+
@@ -287,7 +287,7 @@
-
+
@@ -311,27 +311,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -342,7 +342,7 @@
-
+
@@ -380,20 +380,20 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
"display_name"
diff --git a/threedi_schematisation_editor/styles/vector/grid_refinement/default.qml b/threedi_schematisation_editor/styles/vector/grid_refinement_line/default.qml
similarity index 91%
rename from threedi_schematisation_editor/styles/vector/grid_refinement/default.qml
rename to threedi_schematisation_editor/styles/vector/grid_refinement_line/default.qml
index 43b1ddb..dd95b77 100644
--- a/threedi_schematisation_editor/styles/vector/grid_refinement/default.qml
+++ b/threedi_schematisation_editor/styles/vector/grid_refinement_line/default.qml
@@ -42,7 +42,7 @@
-
+
@@ -236,7 +236,7 @@
-
+
@@ -252,28 +252,28 @@
-
+
-
+
-
+
-
+
-
+
@@ -285,7 +285,7 @@
-
+
@@ -322,7 +322,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -330,14 +330,14 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/grid_refinement/refinement level.qml b/threedi_schematisation_editor/styles/vector/grid_refinement_line/refinement level.qml
similarity index 89%
rename from threedi_schematisation_editor/styles/vector/grid_refinement/refinement level.qml
rename to threedi_schematisation_editor/styles/vector/grid_refinement_line/refinement level.qml
index 0011a73..ad71d22 100644
--- a/threedi_schematisation_editor/styles/vector/grid_refinement/refinement level.qml
+++ b/threedi_schematisation_editor/styles/vector/grid_refinement_line/refinement level.qml
@@ -31,7 +31,7 @@
-
+
@@ -46,7 +46,7 @@
-
+
@@ -144,7 +144,7 @@
-
+
@@ -157,7 +157,7 @@
-
+
@@ -199,7 +199,7 @@
-
+
@@ -207,19 +207,19 @@
-
+
-
+
-
+
-
+
@@ -230,7 +230,7 @@
-
+
@@ -270,20 +270,20 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
"display_name"
diff --git a/threedi_schematisation_editor/styles/vector/groundwater_settings/default.qml b/threedi_schematisation_editor/styles/vector/groundwater/default.qml
similarity index 85%
rename from threedi_schematisation_editor/styles/vector/groundwater_settings/default.qml
rename to threedi_schematisation_editor/styles/vector/groundwater/default.qml
index 1133595..d788d64 100644
--- a/threedi_schematisation_editor/styles/vector/groundwater_settings/default.qml
+++ b/threedi_schematisation_editor/styles/vector/groundwater/default.qml
@@ -57,7 +57,7 @@
-
+
@@ -96,7 +96,7 @@
-
+
@@ -129,7 +129,7 @@
-
+
@@ -165,7 +165,7 @@
-
+
@@ -204,7 +204,7 @@
-
+
@@ -223,7 +223,7 @@
-
+
@@ -233,7 +233,7 @@
-
+
@@ -243,7 +243,7 @@
-
+
@@ -295,47 +295,47 @@
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
@@ -345,22 +345,22 @@
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
@@ -370,22 +370,22 @@
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
@@ -400,22 +400,22 @@
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
@@ -458,27 +458,27 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
-
+
+
+
-
+
-
+
-
+
@@ -487,58 +487,58 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/impervious_surface/area and DWF production.qml b/threedi_schematisation_editor/styles/vector/impervious_surface/area and DWF production.qml
deleted file mode 100644
index 04f9d7a..0000000
--- a/threedi_schematisation_editor/styles/vector/impervious_surface/area and DWF production.qml
+++ /dev/null
@@ -1,710 +0,0 @@
-
-
-
- 1
- 1
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
-
- 0
- .
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "display_name"
-
- 2
-
diff --git a/threedi_schematisation_editor/styles/vector/impervious_surface/default.qml b/threedi_schematisation_editor/styles/vector/impervious_surface/default.qml
deleted file mode 100644
index fa4b972..0000000
--- a/threedi_schematisation_editor/styles/vector/impervious_surface/default.qml
+++ /dev/null
@@ -1,662 +0,0 @@
-
-
-
- 1
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
-
- 0
- .
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "display_name"
-
- 2
-
diff --git a/threedi_schematisation_editor/styles/vector/impervious_surface/surface inclination.qml b/threedi_schematisation_editor/styles/vector/impervious_surface/surface inclination.qml
deleted file mode 100644
index a862bda..0000000
--- a/threedi_schematisation_editor/styles/vector/impervious_surface/surface inclination.qml
+++ /dev/null
@@ -1,483 +0,0 @@
-
-
-
- 1
- 1
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "display_name"
-
-
-
-
-
- 0
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
-
- 0
- .
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "display_name"
-
- 2
-
diff --git a/threedi_schematisation_editor/styles/vector/impervious_surface_map/default.qml b/threedi_schematisation_editor/styles/vector/impervious_surface_map/default.qml
deleted file mode 100644
index 75e66d7..0000000
--- a/threedi_schematisation_editor/styles/vector/impervious_surface_map/default.qml
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
- 1
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C:/Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\impervious_surface_map.ui
- open_edit_form
- 2
-
-
- 0
- uifilelayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "fid"
-
- 1
-
diff --git a/threedi_schematisation_editor/styles/vector/impervious_surface_map/percentage.qml b/threedi_schematisation_editor/styles/vector/impervious_surface_map/percentage.qml
deleted file mode 100644
index 831fded..0000000
--- a/threedi_schematisation_editor/styles/vector/impervious_surface_map/percentage.qml
+++ /dev/null
@@ -1,238 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 1
-
diff --git a/threedi_schematisation_editor/styles/vector/interflow_settings/default.qml b/threedi_schematisation_editor/styles/vector/interflow/default.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/interflow_settings/default.qml
rename to threedi_schematisation_editor/styles/vector/interflow/default.qml
index 0718413..eb87bf4 100644
--- a/threedi_schematisation_editor/styles/vector/interflow_settings/default.qml
+++ b/threedi_schematisation_editor/styles/vector/interflow/default.qml
@@ -132,7 +132,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/lateral_1d/default.qml b/threedi_schematisation_editor/styles/vector/lateral_1d/default.qml
new file mode 100644
index 0000000..50067f1
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/lateral_1d/default.qml
@@ -0,0 +1,576 @@
+
+
+
+ 1
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\lateral_1d.ui
+ open_edit_form
+ 2
+ .
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROWID
+
+ 0
+
diff --git a/threedi_schematisation_editor/styles/vector/1d_lateral/timeseries label.qml b/threedi_schematisation_editor/styles/vector/lateral_1d/timeseries label.qml
similarity index 97%
rename from threedi_schematisation_editor/styles/vector/1d_lateral/timeseries label.qml
rename to threedi_schematisation_editor/styles/vector/lateral_1d/timeseries label.qml
index b44e0b4..2e95e8d 100644
--- a/threedi_schematisation_editor/styles/vector/1d_lateral/timeseries label.qml
+++ b/threedi_schematisation_editor/styles/vector/lateral_1d/timeseries label.qml
@@ -159,8 +159,8 @@
-
-
+
+
.
diff --git a/threedi_schematisation_editor/styles/vector/lateral_2d/default.qml b/threedi_schematisation_editor/styles/vector/lateral_2d/default.qml
new file mode 100644
index 0000000..78da370
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/lateral_2d/default.qml
@@ -0,0 +1,559 @@
+
+
+
+ 1
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\lateral_2d.ui
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "id"
+
+ 0
+
diff --git a/threedi_schematisation_editor/styles/vector/2d_lateral/timeseries label.qml b/threedi_schematisation_editor/styles/vector/lateral_2d/timeseries label.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/2d_lateral/timeseries label.qml
rename to threedi_schematisation_editor/styles/vector/lateral_2d/timeseries label.qml
index ee42650..1b5a5c0 100644
--- a/threedi_schematisation_editor/styles/vector/2d_lateral/timeseries label.qml
+++ b/threedi_schematisation_editor/styles/vector/lateral_2d/timeseries label.qml
@@ -190,7 +190,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/manhole/calculation type.qml b/threedi_schematisation_editor/styles/vector/manhole/calculation type.qml
index 97ee798..2745e4a 100644
--- a/threedi_schematisation_editor/styles/vector/manhole/calculation type.qml
+++ b/threedi_schematisation_editor/styles/vector/manhole/calculation type.qml
@@ -144,7 +144,7 @@
-
+
@@ -472,7 +472,7 @@
-
+
@@ -558,7 +558,7 @@
-
+
@@ -572,7 +572,7 @@
-
+
@@ -600,7 +600,7 @@
-
+
@@ -715,15 +715,15 @@
-
+
-
-
+
+
-
+
@@ -735,15 +735,15 @@
-
+
-
-
+
+
-
+
@@ -755,15 +755,15 @@
-
+
-
-
+
+
-
+
@@ -775,15 +775,15 @@
-
+
-
-
+
+
-
+
@@ -800,15 +800,15 @@
-
+
-
-
+
+
-
+
@@ -856,7 +856,7 @@
-
+
@@ -886,12 +886,12 @@
-
+
-
+
@@ -901,7 +901,7 @@
-
+
@@ -942,18 +942,18 @@
-
+
-
+
-
+
@@ -961,25 +961,25 @@
-
+
-
+
-
+
-
+
@@ -987,27 +987,27 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/manhole/code.qml b/threedi_schematisation_editor/styles/vector/manhole/code.qml
index ccf9c74..10b2ad1 100644
--- a/threedi_schematisation_editor/styles/vector/manhole/code.qml
+++ b/threedi_schematisation_editor/styles/vector/manhole/code.qml
@@ -146,9 +146,9 @@
-
-
-
+
+
+
@@ -859,7 +859,7 @@
-
+
@@ -945,7 +945,7 @@
-
+
@@ -959,7 +959,7 @@
-
+
@@ -987,7 +987,7 @@
-
+
@@ -1102,15 +1102,15 @@
-
+
-
-
+
+
-
+
@@ -1122,15 +1122,15 @@
-
+
-
-
+
+
-
+
@@ -1142,15 +1142,15 @@
-
+
-
-
+
+
-
+
@@ -1162,15 +1162,15 @@
-
+
-
-
+
+
-
+
@@ -1187,15 +1187,15 @@
-
+
-
-
+
+
-
+
@@ -1243,7 +1243,7 @@
-
+
@@ -1273,12 +1273,12 @@
-
+
-
+
@@ -1288,7 +1288,7 @@
-
+
@@ -1329,18 +1329,18 @@
-
+
-
+
-
+
@@ -1348,25 +1348,25 @@
-
+
-
+
-
+
-
+
@@ -1374,27 +1374,27 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/manhole/default.qml b/threedi_schematisation_editor/styles/vector/manhole/default.qml
index 7b77241..b621d9a 100644
--- a/threedi_schematisation_editor/styles/vector/manhole/default.qml
+++ b/threedi_schematisation_editor/styles/vector/manhole/default.qml
@@ -146,9 +146,9 @@
-
-
-
+
+
+
@@ -738,7 +738,7 @@
-
+
@@ -824,7 +824,7 @@
-
+
@@ -838,7 +838,7 @@
-
+
@@ -866,7 +866,7 @@
-
+
@@ -981,15 +981,15 @@
-
+
-
-
+
+
-
+
@@ -1001,15 +1001,15 @@
-
+
-
-
+
+
-
+
@@ -1021,15 +1021,15 @@
-
+
-
-
+
+
-
+
@@ -1041,15 +1041,15 @@
-
+
-
-
+
+
-
+
@@ -1066,15 +1066,15 @@
-
+
-
-
+
+
-
+
@@ -1122,7 +1122,7 @@
-
+
@@ -1152,12 +1152,12 @@
-
+
-
+
@@ -1167,7 +1167,7 @@
-
+
@@ -1208,18 +1208,18 @@
-
+
-
+
-
+
@@ -1227,25 +1227,25 @@
-
+
-
+
-
+
-
+
@@ -1253,27 +1253,27 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/manhole/levels.qml b/threedi_schematisation_editor/styles/vector/manhole/levels.qml
index 540a937..47a82bb 100644
--- a/threedi_schematisation_editor/styles/vector/manhole/levels.qml
+++ b/threedi_schematisation_editor/styles/vector/manhole/levels.qml
@@ -146,9 +146,9 @@
-
-
-
+
+
+
@@ -618,7 +618,7 @@
-
+
@@ -859,7 +859,7 @@
-
+
@@ -945,7 +945,7 @@
-
+
@@ -959,7 +959,7 @@
-
+
@@ -987,7 +987,7 @@
-
+
@@ -1102,15 +1102,15 @@
-
+
-
-
+
+
-
+
@@ -1122,15 +1122,15 @@
-
+
-
-
+
+
-
+
@@ -1142,15 +1142,15 @@
-
+
-
-
+
+
-
+
@@ -1162,15 +1162,15 @@
-
+
-
-
+
+
-
+
@@ -1187,15 +1187,15 @@
-
+
-
-
+
+
-
+
@@ -1243,7 +1243,7 @@
-
+
@@ -1273,12 +1273,12 @@
-
+
-
+
@@ -1288,7 +1288,7 @@
-
+
@@ -1329,18 +1329,18 @@
-
+
-
+
-
+
@@ -1348,25 +1348,25 @@
-
+
-
+
-
+
-
+
@@ -1374,27 +1374,27 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/measure_location/default.qml b/threedi_schematisation_editor/styles/vector/measure_location/default.qml
new file mode 100644
index 0000000..e5ada3e
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/measure_location/default.qml
@@ -0,0 +1,467 @@
+
+
+
+ 1
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\measure_location.ui
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "display_name"
+
+ 0
+
diff --git a/threedi_schematisation_editor/styles/vector/measure_map/default.qml b/threedi_schematisation_editor/styles/vector/measure_map/default.qml
new file mode 100644
index 0000000..a1ba6f1
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/measure_map/default.qml
@@ -0,0 +1,503 @@
+
+
+
+ 1
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\measure_map.ui
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "display_name"
+
+ 1
+
diff --git a/threedi_schematisation_editor/styles/vector/memory_control/default.qml b/threedi_schematisation_editor/styles/vector/memory_control/default.qml
new file mode 100644
index 0000000..060e7eb
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/memory_control/default.qml
@@ -0,0 +1,567 @@
+
+
+
+ 1
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\memory_control.ui
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "display_name"
+
+ 0
+
diff --git a/threedi_schematisation_editor/styles/vector/global_settings/default.qml b/threedi_schematisation_editor/styles/vector/model_settings/default.qml
similarity index 84%
rename from threedi_schematisation_editor/styles/vector/global_settings/default.qml
rename to threedi_schematisation_editor/styles/vector/model_settings/default.qml
index 6cb1623..164f21b 100644
--- a/threedi_schematisation_editor/styles/vector/global_settings/default.qml
+++ b/threedi_schematisation_editor/styles/vector/model_settings/default.qml
@@ -195,7 +195,7 @@
-
+
@@ -215,7 +215,7 @@
-
+
@@ -271,7 +271,7 @@
-
+
@@ -281,7 +281,7 @@
-
+
@@ -291,7 +291,7 @@
-
+
@@ -311,7 +311,7 @@
-
+
@@ -379,7 +379,7 @@
-
+
@@ -395,7 +395,7 @@
-
+
@@ -405,7 +405,7 @@
-
+
@@ -415,7 +415,7 @@
-
+
@@ -437,7 +437,7 @@
-
+
@@ -447,7 +447,7 @@
-
+
@@ -457,7 +457,7 @@
-
+
@@ -511,7 +511,7 @@
-
+
@@ -531,7 +531,7 @@
-
+
@@ -541,7 +541,7 @@
-
+
@@ -551,7 +551,7 @@
-
+
@@ -630,7 +630,7 @@
-
+
@@ -672,7 +672,7 @@
-
+
@@ -728,49 +728,49 @@
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
@@ -778,52 +778,52 @@
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
@@ -834,49 +834,49 @@
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
@@ -887,49 +887,49 @@
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
@@ -945,49 +945,49 @@
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
@@ -1066,17 +1066,17 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
@@ -1110,22 +1110,22 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
-
+
@@ -1145,7 +1145,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1155,17 +1155,17 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
@@ -1180,7 +1180,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1216,22 +1216,22 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
-
+
@@ -1271,7 +1271,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1291,12 +1291,12 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
@@ -1351,166 +1351,166 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/numerical_settings/default.qml b/threedi_schematisation_editor/styles/vector/numerical_settings/default.qml
index a0449b2..04ad0c2 100644
--- a/threedi_schematisation_editor/styles/vector/numerical_settings/default.qml
+++ b/threedi_schematisation_editor/styles/vector/numerical_settings/default.qml
@@ -90,7 +90,7 @@
-
+
@@ -110,7 +110,7 @@
-
+
@@ -120,7 +120,7 @@
-
+
@@ -130,7 +130,7 @@
-
+
@@ -160,7 +160,7 @@
-
+
@@ -170,7 +170,7 @@
-
+
@@ -192,7 +192,7 @@
-
+
@@ -202,7 +202,7 @@
-
+
@@ -212,7 +212,7 @@
-
+
@@ -242,7 +242,7 @@
-
+
@@ -262,7 +262,7 @@
-
+
@@ -287,23 +287,23 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
@@ -313,23 +313,23 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
@@ -339,23 +339,23 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
@@ -365,23 +365,23 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
@@ -396,23 +396,23 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
@@ -449,8 +449,8 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
@@ -458,23 +458,23 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
+
@@ -486,24 +486,24 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
@@ -512,24 +512,24 @@ def my_form_open(dialog, layer, feature):
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
diff --git a/threedi_schematisation_editor/styles/vector/orifice/drawing direction.qml b/threedi_schematisation_editor/styles/vector/orifice/drawing direction.qml
index 68484a6..74f52d3 100644
--- a/threedi_schematisation_editor/styles/vector/orifice/drawing direction.qml
+++ b/threedi_schematisation_editor/styles/vector/orifice/drawing direction.qml
@@ -98,7 +98,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/pipe/calculation type.qml b/threedi_schematisation_editor/styles/vector/pipe/calculation type.qml
index 8099370..15bc3dc 100644
--- a/threedi_schematisation_editor/styles/vector/pipe/calculation type.qml
+++ b/threedi_schematisation_editor/styles/vector/pipe/calculation type.qml
@@ -144,7 +144,7 @@
-
+
@@ -670,7 +670,7 @@
-
+
@@ -689,7 +689,7 @@
-
+
@@ -703,7 +703,7 @@
-
+
@@ -717,7 +717,7 @@
-
+
@@ -761,7 +761,7 @@
-
+
@@ -1054,13 +1054,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1081,13 +1081,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1108,13 +1108,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1135,13 +1135,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1167,13 +1167,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1230,12 +1230,12 @@
-
+
-
+
@@ -1245,12 +1245,12 @@
-
+
-
+
@@ -1265,7 +1265,7 @@
-
+
@@ -1325,7 +1325,7 @@
-
+
@@ -1334,7 +1334,7 @@
-
+
@@ -1342,9 +1342,9 @@
-
-
-
+
+
+
@@ -1353,7 +1353,7 @@
-
+
@@ -1362,7 +1362,7 @@
-
+
@@ -1370,9 +1370,9 @@
-
-
-
+
+
+
@@ -1380,7 +1380,7 @@
-
+
@@ -1389,7 +1389,7 @@
-
+
@@ -1397,9 +1397,9 @@
-
-
-
+
+
+
diff --git a/threedi_schematisation_editor/styles/vector/pipe/code.qml b/threedi_schematisation_editor/styles/vector/pipe/code.qml
index ead8f5c..287be98 100644
--- a/threedi_schematisation_editor/styles/vector/pipe/code.qml
+++ b/threedi_schematisation_editor/styles/vector/pipe/code.qml
@@ -900,7 +900,7 @@
-
+
@@ -919,7 +919,7 @@
-
+
@@ -933,7 +933,7 @@
-
+
@@ -947,7 +947,7 @@
-
+
@@ -991,7 +991,7 @@
-
+
@@ -1284,13 +1284,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1311,13 +1311,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1338,13 +1338,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1365,13 +1365,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1397,13 +1397,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1460,12 +1460,12 @@
-
+
-
+
@@ -1475,12 +1475,12 @@
-
+
-
+
@@ -1495,7 +1495,7 @@
-
+
@@ -1555,7 +1555,7 @@
-
+
@@ -1564,7 +1564,7 @@
-
+
@@ -1572,9 +1572,9 @@
-
-
-
+
+
+
@@ -1583,7 +1583,7 @@
-
+
@@ -1592,7 +1592,7 @@
-
+
@@ -1600,9 +1600,9 @@
-
-
-
+
+
+
@@ -1610,7 +1610,7 @@
-
+
@@ -1619,7 +1619,7 @@
-
+
@@ -1627,9 +1627,9 @@
-
-
-
+
+
+
diff --git a/threedi_schematisation_editor/styles/vector/pipe/cross-section.qml b/threedi_schematisation_editor/styles/vector/pipe/cross-section.qml
index bbb52c0..a704012 100644
--- a/threedi_schematisation_editor/styles/vector/pipe/cross-section.qml
+++ b/threedi_schematisation_editor/styles/vector/pipe/cross-section.qml
@@ -759,7 +759,7 @@
-
+
@@ -778,7 +778,7 @@
-
+
@@ -792,7 +792,7 @@
-
+
@@ -806,7 +806,7 @@
-
+
@@ -850,7 +850,7 @@
-
+
@@ -1143,13 +1143,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1170,13 +1170,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1197,13 +1197,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1224,13 +1224,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1256,13 +1256,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1319,12 +1319,12 @@
-
+
-
+
@@ -1334,12 +1334,12 @@
-
+
-
+
@@ -1354,7 +1354,7 @@
-
+
@@ -1414,7 +1414,7 @@
-
+
@@ -1423,7 +1423,7 @@
-
+
@@ -1431,9 +1431,9 @@
-
-
-
+
+
+
@@ -1442,7 +1442,7 @@
-
+
@@ -1451,7 +1451,7 @@
-
+
@@ -1459,9 +1459,9 @@
-
-
-
+
+
+
@@ -1469,7 +1469,7 @@
-
+
@@ -1478,7 +1478,7 @@
-
+
@@ -1486,9 +1486,9 @@
-
-
-
+
+
+
diff --git a/threedi_schematisation_editor/styles/vector/pipe/default.qml b/threedi_schematisation_editor/styles/vector/pipe/default.qml
index 32f7248..f4ae93f 100644
--- a/threedi_schematisation_editor/styles/vector/pipe/default.qml
+++ b/threedi_schematisation_editor/styles/vector/pipe/default.qml
@@ -897,7 +897,7 @@
-
+
@@ -916,7 +916,7 @@
-
+
@@ -930,7 +930,7 @@
-
+
@@ -944,7 +944,7 @@
-
+
@@ -988,7 +988,7 @@
-
+
@@ -1281,13 +1281,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1308,13 +1308,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1335,13 +1335,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1362,13 +1362,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1394,13 +1394,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1457,12 +1457,12 @@
-
+
-
+
@@ -1472,12 +1472,12 @@
-
+
-
+
@@ -1492,7 +1492,7 @@
-
+
@@ -1552,7 +1552,7 @@
-
+
@@ -1561,7 +1561,7 @@
-
+
@@ -1569,9 +1569,9 @@
-
-
-
+
+
+
@@ -1580,7 +1580,7 @@
-
+
@@ -1589,7 +1589,7 @@
-
+
@@ -1597,9 +1597,9 @@
-
-
-
+
+
+
@@ -1607,7 +1607,7 @@
-
+
@@ -1616,7 +1616,7 @@
-
+
@@ -1624,9 +1624,9 @@
-
-
-
+
+
+
diff --git a/threedi_schematisation_editor/styles/vector/pipe/drawing direction.qml b/threedi_schematisation_editor/styles/vector/pipe/drawing direction.qml
index 76d785e..9cdc8dd 100644
--- a/threedi_schematisation_editor/styles/vector/pipe/drawing direction.qml
+++ b/threedi_schematisation_editor/styles/vector/pipe/drawing direction.qml
@@ -228,7 +228,7 @@
-
+
@@ -363,7 +363,7 @@
-
+
@@ -498,7 +498,7 @@
-
+
@@ -633,7 +633,7 @@
-
+
@@ -768,7 +768,7 @@
-
+
@@ -903,7 +903,7 @@
-
+
@@ -956,7 +956,7 @@
-
+
@@ -1335,7 +1335,7 @@
-
+
@@ -1405,7 +1405,7 @@
-
+
@@ -1560,7 +1560,7 @@
-
+
@@ -1837,7 +1837,7 @@
-
+
@@ -1856,7 +1856,7 @@
-
+
@@ -1870,7 +1870,7 @@
-
+
@@ -1884,7 +1884,7 @@
-
+
@@ -1928,7 +1928,7 @@
-
+
@@ -2221,13 +2221,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2248,13 +2248,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2275,13 +2275,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2302,13 +2302,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2334,13 +2334,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2397,12 +2397,12 @@
-
+
-
+
@@ -2412,12 +2412,12 @@
-
+
-
+
@@ -2432,7 +2432,7 @@
-
+
@@ -2492,7 +2492,7 @@
-
+
@@ -2501,7 +2501,7 @@
-
+
@@ -2509,9 +2509,9 @@
-
-
-
+
+
+
@@ -2520,7 +2520,7 @@
-
+
@@ -2529,7 +2529,7 @@
-
+
@@ -2537,9 +2537,9 @@
-
-
-
+
+
+
@@ -2547,7 +2547,7 @@
-
+
@@ -2556,7 +2556,7 @@
-
+
@@ -2564,9 +2564,9 @@
-
-
-
+
+
+
diff --git a/threedi_schematisation_editor/styles/vector/pipe/levels and flow direction.qml b/threedi_schematisation_editor/styles/vector/pipe/levels and flow direction.qml
index 46a1288..1b68c27 100644
--- a/threedi_schematisation_editor/styles/vector/pipe/levels and flow direction.qml
+++ b/threedi_schematisation_editor/styles/vector/pipe/levels and flow direction.qml
@@ -228,7 +228,7 @@
-
+
@@ -276,7 +276,7 @@
-
+
@@ -363,7 +363,7 @@
-
+
@@ -411,12 +411,12 @@
-
+
-
+
@@ -503,7 +503,7 @@
-
+
@@ -551,12 +551,12 @@
-
+
-
+
@@ -643,7 +643,7 @@
-
+
@@ -691,12 +691,12 @@
-
+
-
+
@@ -783,7 +783,7 @@
-
+
@@ -831,12 +831,12 @@
-
+
-
+
@@ -923,7 +923,7 @@
-
+
@@ -971,12 +971,12 @@
-
+
-
+
@@ -1223,7 +1223,7 @@
-
+
@@ -1271,12 +1271,12 @@
-
+
-
+
@@ -1298,7 +1298,7 @@
-
+
@@ -1458,7 +1458,7 @@
-
+
@@ -1740,7 +1740,7 @@
-
+
@@ -1759,7 +1759,7 @@
-
+
@@ -1773,7 +1773,7 @@
-
+
@@ -1787,7 +1787,7 @@
-
+
@@ -1831,7 +1831,7 @@
-
+
@@ -2124,13 +2124,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2151,13 +2151,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2178,13 +2178,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2205,13 +2205,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2237,13 +2237,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -2300,12 +2300,12 @@
-
+
-
+
@@ -2315,12 +2315,12 @@
-
+
-
+
@@ -2335,7 +2335,7 @@
-
+
@@ -2395,7 +2395,7 @@
-
+
@@ -2404,7 +2404,7 @@
-
+
@@ -2412,9 +2412,9 @@
-
-
-
+
+
+
@@ -2423,7 +2423,7 @@
-
+
@@ -2432,7 +2432,7 @@
-
+
@@ -2440,9 +2440,9 @@
-
-
-
+
+
+
@@ -2450,7 +2450,7 @@
-
+
@@ -2459,7 +2459,7 @@
-
+
@@ -2467,9 +2467,9 @@
-
-
-
+
+
+
diff --git a/threedi_schematisation_editor/styles/vector/potential_breach/default.qml b/threedi_schematisation_editor/styles/vector/potential_breach/default.qml
index f76eb39..decd5c5 100644
--- a/threedi_schematisation_editor/styles/vector/potential_breach/default.qml
+++ b/threedi_schematisation_editor/styles/vector/potential_breach/default.qml
@@ -470,7 +470,7 @@
-
+
@@ -493,7 +493,7 @@
-
+
@@ -503,7 +503,7 @@
-
+
@@ -513,7 +513,7 @@
-
+
@@ -523,7 +523,7 @@
-
+
@@ -538,7 +538,7 @@
-
+
@@ -562,7 +562,7 @@
-
+
@@ -572,7 +572,7 @@
-
+
@@ -582,7 +582,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/pumpstation/capacity.qml b/threedi_schematisation_editor/styles/vector/pump/capacity.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/pumpstation/capacity.qml
rename to threedi_schematisation_editor/styles/vector/pump/capacity.qml
index 6cb75c6..09f70af 100644
--- a/threedi_schematisation_editor/styles/vector/pumpstation/capacity.qml
+++ b/threedi_schematisation_editor/styles/vector/pump/capacity.qml
@@ -689,7 +689,7 @@
-
+
@@ -795,7 +795,7 @@ def my_form_open(dialog, layer, feature):
0
tablayout
-
+
diff --git a/threedi_schematisation_editor/styles/vector/pumpstation/default.qml b/threedi_schematisation_editor/styles/vector/pump/default.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/pumpstation/default.qml
rename to threedi_schematisation_editor/styles/vector/pump/default.qml
index 4de3504..d7d5ef9 100644
--- a/threedi_schematisation_editor/styles/vector/pumpstation/default.qml
+++ b/threedi_schematisation_editor/styles/vector/pump/default.qml
@@ -218,7 +218,7 @@
0
tablayout
-
+
diff --git a/threedi_schematisation_editor/styles/vector/pumpstation/levels.qml b/threedi_schematisation_editor/styles/vector/pump/levels.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/pumpstation/levels.qml
rename to threedi_schematisation_editor/styles/vector/pump/levels.qml
index 08fc78e..1aa77df 100644
--- a/threedi_schematisation_editor/styles/vector/pumpstation/levels.qml
+++ b/threedi_schematisation_editor/styles/vector/pump/levels.qml
@@ -364,7 +364,7 @@
-
+
@@ -470,7 +470,7 @@ def my_form_open(dialog, layer, feature):
0
tablayout
-
+
diff --git a/threedi_schematisation_editor/styles/vector/pumpstation_map/capacity.qml b/threedi_schematisation_editor/styles/vector/pump_map/capacity.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/pumpstation_map/capacity.qml
rename to threedi_schematisation_editor/styles/vector/pump_map/capacity.qml
index b06f328..11f3e72 100644
--- a/threedi_schematisation_editor/styles/vector/pumpstation_map/capacity.qml
+++ b/threedi_schematisation_editor/styles/vector/pump_map/capacity.qml
@@ -1841,7 +1841,7 @@ def my_form_open(dialog, layer, feature):
0
tablayout
-
+
diff --git a/threedi_schematisation_editor/styles/vector/pumpstation_map/default.qml b/threedi_schematisation_editor/styles/vector/pump_map/default.qml
similarity index 97%
rename from threedi_schematisation_editor/styles/vector/pumpstation_map/default.qml
rename to threedi_schematisation_editor/styles/vector/pump_map/default.qml
index 3434a3e..84d7116 100644
--- a/threedi_schematisation_editor/styles/vector/pumpstation_map/default.qml
+++ b/threedi_schematisation_editor/styles/vector/pump_map/default.qml
@@ -182,7 +182,7 @@
-
+
@@ -204,7 +204,7 @@
- C:/Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\pumpstation_map.ui
+ C:/Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\pump_map.ui
open_edit_form
2
.
@@ -212,7 +212,7 @@
0
uifilelayout
-
+
@@ -256,7 +256,7 @@
-
+
@@ -279,7 +279,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/pumpstation_map/levels.qml b/threedi_schematisation_editor/styles/vector/pump_map/levels.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/pumpstation_map/levels.qml
rename to threedi_schematisation_editor/styles/vector/pump_map/levels.qml
index d2a72ee..37c7cef 100644
--- a/threedi_schematisation_editor/styles/vector/pumpstation_map/levels.qml
+++ b/threedi_schematisation_editor/styles/vector/pump_map/levels.qml
@@ -442,7 +442,7 @@
-
+
@@ -538,7 +538,7 @@ def my_form_open(dialog, layer, feature):
0
tablayout
-
+
diff --git a/threedi_schematisation_editor/styles/vector/simple_infiltration_settings/default.qml b/threedi_schematisation_editor/styles/vector/simple_infiltration/default.qml
similarity index 88%
rename from threedi_schematisation_editor/styles/vector/simple_infiltration_settings/default.qml
rename to threedi_schematisation_editor/styles/vector/simple_infiltration/default.qml
index 86156d0..48c4831 100644
--- a/threedi_schematisation_editor/styles/vector/simple_infiltration_settings/default.qml
+++ b/threedi_schematisation_editor/styles/vector/simple_infiltration/default.qml
@@ -92,7 +92,7 @@
-
+
@@ -112,7 +112,7 @@
-
+
@@ -133,19 +133,19 @@
-
+
-
+
-
+
-
+
-
+
@@ -153,9 +153,9 @@
-
+
-
+
@@ -163,9 +163,9 @@
-
+
-
+
@@ -178,9 +178,9 @@
-
+
-
+
@@ -218,8 +218,8 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
@@ -230,8 +230,8 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
@@ -240,8 +240,8 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
@@ -250,8 +250,8 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
diff --git a/threedi_schematisation_editor/styles/vector/surface/area and DWF production.qml b/threedi_schematisation_editor/styles/vector/surface/area and DWF production.qml
deleted file mode 100644
index 5a9470c..0000000
--- a/threedi_schematisation_editor/styles/vector/surface/area and DWF production.qml
+++ /dev/null
@@ -1,648 +0,0 @@
-
-
-
- 1
- 1
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "display_name"
-
-
-
-
-
- 0
- 0
- 0.9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 0
- tablayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "display_name"
-
- 2
-
diff --git a/threedi_schematisation_editor/styles/vector/surface/default.qml b/threedi_schematisation_editor/styles/vector/surface/default.qml
index c58c1d8..34f8d01 100644
--- a/threedi_schematisation_editor/styles/vector/surface/default.qml
+++ b/threedi_schematisation_editor/styles/vector/surface/default.qml
@@ -1,31 +1,173 @@
-
+
1
0
1
+ 0
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -39,41 +181,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
0
0
1
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -86,7 +285,7 @@
-
+
@@ -105,17 +304,10 @@
-
+
-
-
-
-
-
-
-
-
+
@@ -125,7 +317,7 @@
-
+
@@ -135,75 +327,35 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -213,7 +365,7 @@
-
+
@@ -225,70 +377,58 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -297,48 +437,54 @@
-
- 0
+ open_edit_form
+ 2
-
+
0
- tablayout
+ uifilelayout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -349,9 +495,10 @@ def my_form_open(dialog, layer, feature):
-
+
+
@@ -364,11 +511,20 @@ def my_form_open(dialog, layer, feature):
+
+
+
+
+
+
+
+
+
"display_name"
-
+
2
diff --git a/threedi_schematisation_editor/styles/vector/surface_map/default.qml b/threedi_schematisation_editor/styles/vector/surface_map/default.qml
index 656521c..5a0cbb5 100644
--- a/threedi_schematisation_editor/styles/vector/surface_map/default.qml
+++ b/threedi_schematisation_editor/styles/vector/surface_map/default.qml
@@ -102,7 +102,7 @@
-
+
@@ -117,7 +117,7 @@
- C:/Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\surface_map.ui
+ C:/Users/lukas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\threedi_schematisation_editor\forms\ui\impervious_surface_map.ui
open_edit_form
2
@@ -128,15 +128,15 @@
+
-
+
-
diff --git a/threedi_schematisation_editor/styles/vector/surface_parameters/default.qml b/threedi_schematisation_editor/styles/vector/surface_parameters/default.qml
index b050975..867089b 100644
--- a/threedi_schematisation_editor/styles/vector/surface_parameters/default.qml
+++ b/threedi_schematisation_editor/styles/vector/surface_parameters/default.qml
@@ -124,7 +124,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/table_control/default.qml b/threedi_schematisation_editor/styles/vector/table_control/default.qml
new file mode 100644
index 0000000..b62f151
--- /dev/null
+++ b/threedi_schematisation_editor/styles/vector/table_control/default.qml
@@ -0,0 +1,503 @@
+
+
+
+ 1
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ open_edit_form
+ 2
+
+
+ 0
+ uifilelayout
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "display_name"
+
+ 0
+
diff --git a/threedi_schematisation_editor/styles/vector/vegetation_drag/default.qml b/threedi_schematisation_editor/styles/vector/vegetation_drag_2d/default.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/vegetation_drag/default.qml
rename to threedi_schematisation_editor/styles/vector/vegetation_drag_2d/default.qml
index 2f44cd6..3ccf8ac 100644
--- a/threedi_schematisation_editor/styles/vector/vegetation_drag/default.qml
+++ b/threedi_schematisation_editor/styles/vector/vegetation_drag_2d/default.qml
@@ -254,7 +254,7 @@
-
+
diff --git a/threedi_schematisation_editor/styles/vector/windshielding/default.qml b/threedi_schematisation_editor/styles/vector/windshielding_1d/default.qml
similarity index 99%
rename from threedi_schematisation_editor/styles/vector/windshielding/default.qml
rename to threedi_schematisation_editor/styles/vector/windshielding_1d/default.qml
index 9fb9a5e..d46c9a0 100644
--- a/threedi_schematisation_editor/styles/vector/windshielding/default.qml
+++ b/threedi_schematisation_editor/styles/vector/windshielding_1d/default.qml
@@ -134,7 +134,7 @@
-
+
diff --git a/threedi_schematisation_editor/user_layer_forms.py b/threedi_schematisation_editor/user_layer_forms.py
index 4570de6..44a6d78 100644
--- a/threedi_schematisation_editor/user_layer_forms.py
+++ b/threedi_schematisation_editor/user_layer_forms.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
from threedi_schematisation_editor.forms.custom_forms import MODEL_FORMS
from threedi_schematisation_editor.utils import disconnect_signal
diff --git a/threedi_schematisation_editor/user_layer_handlers.py b/threedi_schematisation_editor/user_layer_handlers.py
index 2e445e5..102c614 100644
--- a/threedi_schematisation_editor/user_layer_handlers.py
+++ b/threedi_schematisation_editor/user_layer_handlers.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
from collections import defaultdict
from functools import cached_property, partial
from types import MappingProxyType
@@ -8,16 +8,19 @@
import threedi_schematisation_editor.data_models as dm
from threedi_schematisation_editor.enumerators import (
- CalculationTypeCulvert,
- CalculationTypeNode,
+ BoundaryType,
CrestType,
+ ExchangeTypeCulvert,
+ ExchangeTypeNode,
FrictionType,
GeometryType,
- ManholeIndicator,
+ Later2DType,
ManholeShape,
PipeMaterial,
PumpType,
- ZoomCategories,
+ TimeUnit,
+ Unit,
+ Visualisation,
)
from threedi_schematisation_editor.utils import (
connect_signal,
@@ -213,10 +216,20 @@ def detect_dependent_features(self, fid, model_cls, visited_features):
feat_real = next(handler.layer_dt.getFeatures(request))
except StopIteration: # Feature not committed
return dependent_features
+ feat_table_name = model_cls.__tablename__
feat_real_id = feat_real["id"]
for dependent_data_model, dependent_fields in dm.MODEL_DEPENDENCIES[model_cls].items():
dependent_layer = self.layer_manager.model_handlers[dependent_data_model].layer
- expr_str = " OR ".join(f'"{field_name}" = {feat_real_id}' for field_name in dependent_fields)
+ expr_parts = []
+ for dependent_feat_id_field in dependent_fields:
+ if isinstance(dependent_feat_id_field, tuple):
+ # We have a pair of fields: field with dependent feature ID and field with dependent feature type
+ dependent_feat_id_field, dependent_feat_type_field = dependent_feat_id_field
+ expr_part = f'("{dependent_feat_id_field}" = {feat_real_id} AND "{dependent_feat_type_field}" = \'{feat_table_name}\')'
+ else:
+ expr_part = f'"{dependent_feat_id_field}" = {feat_real_id}'
+ expr_parts.append(expr_part)
+ expr_str = " OR ".join(expr_parts)
expr = QgsExpression(expr_str)
for dependent_feat in dependent_layer.getFeatures(QgsFeatureRequest(expr)):
dependent_fid = dependent_feat.id()
@@ -323,7 +336,7 @@ def create_new_feature_from_template(self, template_feat, geometry=None, fields_
field_values = dict()
for field in template_feat.fields():
field_name = field.name()
- if field_name == "fid" or (fields_to_skip is not None and field_name in fields_to_skip):
+ if fields_to_skip is not None and field_name in fields_to_skip:
continue
field_values[field_name] = template_feat[field_name]
new_feat = self.create_new_feature(geometry=geometry, use_defaults=False)
@@ -363,16 +376,16 @@ def update_node_references(self, feat_id, geometry):
start_connection_node_feat, end_connection_node_feat = find_linestring_nodes(linestring, node_layer)
changes = {}
start_connection_node_id = start_connection_node_feat["id"] if start_connection_node_feat else None
- start_connection_node_id_idx = layer_fields.lookupField("connection_node_start_id")
+ start_connection_node_id_idx = layer_fields.lookupField("connection_node_id_start")
changes[start_connection_node_id_idx] = start_connection_node_id
end_connection_node_id = end_connection_node_feat["id"] if end_connection_node_feat else None
- end_connection_node_id_idx = layer_fields.lookupField("connection_node_end_id")
+ end_connection_node_id_idx = layer_fields.lookupField("connection_node_id_end")
changes[end_connection_node_id_idx] = end_connection_node_id
- if self.MODEL == dm.PumpstationMap:
- pumpstation_layer = self.layer_manager.model_handlers[dm.Pumpstation].layer
- start_pump_feat = find_point_nodes(linestring[0], pumpstation_layer)
+ if self.MODEL == dm.PumpMap:
+ pump_layer = self.layer_manager.model_handlers[dm.Pump].layer
+ start_pump_feat = find_point_nodes(linestring[0], pump_layer)
start_pump_id = start_pump_feat["id"] if start_pump_feat else None
- start_pump_id_idx = layer_fields.lookupField("pumpstation_id")
+ start_pump_id_idx = layer_fields.lookupField("pump_id")
changes[start_pump_id_idx] = start_pump_id
self.layer.changeAttributeValues(feat_id, changes)
@@ -386,67 +399,54 @@ class ConnectionNodeHandler(UserLayerHandler):
MODEL = dm.ConnectionNode
DEFAULTS = MappingProxyType(
{
+ "display_name": "new",
"code": "new",
+ "length": 0.8,
+ "width": 0.8,
+ "shape": ManholeShape.ROUND.value,
+ "exchange_type": ExchangeTypeNode.ISOLATED.value,
+ "bottom_level": -10.0,
}
)
- def get_manhole_feat_for_node_id(self, node_id):
- """Check if there is a manhole feature defined for node of the given node_id and return it."""
- manhole_feat = None
- if node_id not in (None, NULL):
- manhole_feats = self.layer_manager.get_layer_features(dm.Manhole, f'"connection_node_id" = {node_id}')
- try:
- manhole_feat = next(manhole_feats)
- except StopIteration:
- pass
- return manhole_feat
-
class BoundaryCondition1DHandler(UserLayerHandler):
MODEL = dm.BoundaryCondition1D
-
-
-class Lateral1DHandler(UserLayerHandler):
- MODEL = dm.Lateral1D
-
-
-class ManholeHandler(UserLayerHandler):
- MODEL = dm.Manhole
+ DEFAULTS = MappingProxyType(
+ {
+ "display_name": "new",
+ "code": "new",
+ "type": BoundaryType.WATER_LEVEL.value,
+ "time_units": "seconds",
+ }
+ )
RELATED_MODELS = MappingProxyType(
{
dm.ConnectionNode: 1,
}
)
+
+
+class Lateral1DHandler(UserLayerHandler):
+ MODEL = dm.Lateral1D
DEFAULTS = MappingProxyType(
{
"display_name": "new",
"code": "new",
- "length": 0.8,
- "width": 0.8,
- "shape": ManholeShape.ROUND.value,
- "manhole_indicator": ManholeIndicator.INSPECTION.value,
- "calculation_type": CalculationTypeNode.ISOLATED.value,
- "bottom_level": -10.0,
+ "offset": 0,
+ "units": Unit.M3_SECONDS.value,
+ "time_units": TimeUnit.SECONDS.value,
+ }
+ )
+ RELATED_MODELS = MappingProxyType(
+ {
+ dm.ConnectionNode: 1,
}
)
-
- def create_manhole_with_connection_node(self, geometry, template_feat=None):
- """Creating manhole with connection node at same location."""
- connection_node_handler = self.layer_manager.model_handlers[dm.ConnectionNode]
- if template_feat is not None:
- template_connection_node_id = template_feat["connection_node_id"]
- node_template = connection_node_handler.layer.getFeature(template_connection_node_id)
- node_feat = connection_node_handler.create_new_feature_from_template(node_template, geometry=geometry)
- manhole_feat = self.create_new_feature_from_template(template_feat, geometry=geometry)
- else:
- node_feat = connection_node_handler.create_new_feature(geometry=geometry)
- manhole_feat = self.create_new_feature(geometry=geometry)
- manhole_feat["connection_node_id"] = node_feat["id"]
- return manhole_feat, node_feat
-class PumpstationHandler(UserLayerHandler):
- MODEL = dm.Pumpstation
+class PumpHandler(UserLayerHandler):
+ MODEL = dm.Pump
RELATED_MODELS = MappingProxyType(
{
dm.ConnectionNode: 1,
@@ -464,58 +464,59 @@ class PumpstationHandler(UserLayerHandler):
def connect_additional_signals(self):
"""Connecting signals to action specific for the particular layers."""
- self.layer.featureAdded.connect(self.adjust_manhole_indicator)
+ self.layer.featureAdded.connect(self.adjust_visualisation)
self.layer.geometryChanged.connect(self.trigger_update_node_references)
def disconnect_additional_signals(self):
"""Disconnecting signals to action specific for the particular layers."""
- self.layer.featureAdded.disconnect(self.adjust_manhole_indicator)
+ self.layer.featureAdded.disconnect(self.adjust_visualisation)
self.layer.geometryChanged.disconnect(self.trigger_update_node_references)
- def adjust_manhole_indicator(self, feat_id):
- """Adjusting underlying manhole attributes."""
+ def adjust_visualisation(self, feat_id):
+ """Adjusting underlying connection node type."""
if feat_id < 0: # This logic should be triggered just once after adding feature, but before committing changes.
feat = self.layer.getFeature(feat_id)
point = feat.geometry().asPoint()
- manhole_handler = self.layer_manager.model_handlers[dm.Manhole]
- manhole_layer = manhole_handler.layer
- manhole_feat = find_point_nodes(point, manhole_layer)
- if manhole_feat is not None:
- manhole_fid = manhole_feat.id()
- if not manhole_layer.isEditable():
- manhole_layer.startEditing()
- manhole_indicator_idx = manhole_layer.fields().lookupField("manhole_indicator")
- manhole_layer.changeAttributeValue(manhole_fid, manhole_indicator_idx, ManholeIndicator.PUMP.value)
-
- def get_pumpstation_feats_for_node_id(self, node_id):
- """Check if there is a pumpstation features defined for node of the given node_id and return it."""
+ connection_node_handler = self.layer_manager.model_handlers[dm.ConnectionNode]
+ connection_node_layer = connection_node_handler.layer
+ connection_node_feat = find_point_nodes(point, connection_node_layer)
+ if connection_node_feat is not None:
+ connection_node_fid = connection_node_feat.id()
+ if not connection_node_layer.isEditable():
+ connection_node_layer.startEditing()
+ visualisation_idx = connection_node_layer.fields().lookupField("visualisation")
+ connection_node_layer.changeAttributeValue(
+ connection_node_fid, visualisation_idx, Visualisation.PUMP.value
+ )
+
+ def get_pump_feats_for_node_id(self, node_id):
+ """Check if there is a pump features defined for node of the given node_id and return it."""
pump_feats = []
if node_id not in (None, NULL):
exp = f'"connection_node_id" = {node_id}'
- pump_feats = list(self.layer_manager.get_layer_features(dm.Pumpstation, exp))
+ pump_feats = list(self.layer_manager.get_layer_features(dm.Pump, exp))
return pump_feats
def create_pump_with_connection_node(self, geometry, template_feat=None):
- """Creating pumpstation with connection node at same location."""
+ """Creating pump with connection node at same location."""
connection_node_handler = self.layer_manager.model_handlers[dm.ConnectionNode]
if template_feat is not None:
template_connection_node_id = template_feat["connection_node_id"]
node_template = connection_node_handler.layer.getFeature(template_connection_node_id)
node_feat = connection_node_handler.create_new_feature_from_template(node_template, geometry=geometry)
- pumpstation_feat = self.create_new_feature_from_template(template_feat, geometry=geometry)
+ pump_feat = self.create_new_feature_from_template(template_feat, geometry=geometry)
else:
node_feat = connection_node_handler.create_new_feature(geometry=geometry)
- pumpstation_feat = self.create_new_feature(geometry=geometry)
- pumpstation_feat["connection_node_id"] = node_feat["id"]
- return pumpstation_feat, node_feat
+ pump_feat = self.create_new_feature(geometry=geometry)
+ pump_feat["connection_node_id"] = node_feat["id"]
+ return pump_feat, node_feat
-class PumpstationMapHandler(UserLayerHandler):
- MODEL = dm.PumpstationMap
+class PumpMapHandler(UserLayerHandler):
+ MODEL = dm.PumpMap
RELATED_MODELS = MappingProxyType(
{
- dm.ConnectionNode: 2,
- dm.Pumpstation: 1,
+ dm.Pump: 1,
}
)
DEFAULTS = MappingProxyType(
@@ -527,17 +528,17 @@ class PumpstationMapHandler(UserLayerHandler):
def connect_additional_signals(self):
"""Connecting signals to action specific for the particular layers."""
- self.layer.featureAdded.connect(self.trigger_simplify_pumpstation_map)
+ self.layer.featureAdded.connect(self.trigger_simplify_pump_map)
self.layer.geometryChanged.connect(self.trigger_update_node_references)
def disconnect_additional_signals(self):
"""Disconnecting signals to action specific for the particular layers."""
- self.layer.featureAdded.disconnect(self.trigger_simplify_pumpstation_map)
+ self.layer.featureAdded.disconnect(self.trigger_simplify_pump_map)
self.layer.geometryChanged.disconnect(self.trigger_update_node_references)
- def trigger_simplify_pumpstation_map(self, pumpstation_map_id):
+ def trigger_simplify_pump_map(self, pump_map_id):
"""Triggering geometry simplification on newly added feature."""
- simplify_method = partial(self.simplify_linear_feature, pumpstation_map_id)
+ simplify_method = partial(self.simplify_linear_feature, pump_map_id)
QTimer.singleShot(0, simplify_method)
@@ -593,14 +594,14 @@ class CulvertHandler(UserLayerHandler):
{
"display_name": "new",
"code": "new",
- "dist_calc_points": 1000,
- "calculation_type": CalculationTypeCulvert.ISOLATED.value,
+ "calculation_point_distance": 1000,
+ "exchange_type": ExchangeTypeCulvert.ISOLATED.value,
"friction_type": FrictionType.MANNING.value,
"friction_value": 0.02,
"discharge_coefficient_positive": 0.8,
"discharge_coefficient_negative": 0.8,
- "invert_level_start_point": -10.0,
- "invert_level_end_point": -10.0,
+ "invert_level_start": -10.0,
+ "invert_level_end": -10.0,
}
)
@@ -660,20 +661,18 @@ class PipeHandler(UserLayerHandler):
RELATED_MODELS = MappingProxyType(
{
dm.ConnectionNode: 2,
- dm.Manhole: 2,
}
)
DEFAULTS = MappingProxyType(
{
"display_name": "new",
"code": "new",
- "dist_calc_points": 1000,
+ "calculation_point_distance": 1000,
"friction_type": FrictionType.MANNING.value,
- "calculation_type": CalculationTypeNode.ISOLATED.value,
- "material": PipeMaterial.CONCRETE.value,
+ "exchange_type": ExchangeTypeNode.ISOLATED.value,
"friction_value": dm.TABLE_MANNING[PipeMaterial.CONCRETE],
- "invert_level_start_point": -10.0,
- "invert_level_end_point": -10.0,
+ "invert_level_start": -10.0,
+ "invert_level_end": -10.0,
}
)
@@ -703,8 +702,6 @@ def segmentize_pipe(self, pipe_feat_id):
"""Method to split single pipe into 2 vertices segments."""
connection_node_handler = self.layer_manager.model_handlers[dm.ConnectionNode]
connection_node_layer = connection_node_handler.layer
- manhole_handler = self.layer_manager.model_handlers[dm.Manhole]
- manhole_layer = manhole_handler.layer
pipe_feat = self.layer.getFeature(pipe_feat_id)
pipe_geom = pipe_feat.geometry()
vertices_count = count_vertices(pipe_geom)
@@ -714,59 +711,51 @@ def segmentize_pipe(self, pipe_feat_id):
points_connection_nodes = {}
intermediate_bottom_levels = {}
pipe_polyline = pipe_geom.asPolyline()
- manhole_template = None
+ connection_node_template = None
for idx, point in enumerate(pipe_polyline):
if idx == start_vertex_idx:
- connection_node_id = pipe_feat["connection_node_start_id"]
+ connection_node_id = pipe_feat["connection_node_id_start"]
points_connection_nodes[point] = connection_node_id
- manhole_template = connection_node_handler.get_manhole_feat_for_node_id(connection_node_id)
+ connection_node_template = connection_node_handler.get_feat_by_id(connection_node_id)
elif idx == end_vertex_idx:
- connection_node_id = pipe_feat["connection_node_end_id"]
+ connection_node_id = pipe_feat["connection_node_id_end"]
points_connection_nodes[point] = connection_node_id
- intermediate_bottom_levels[point] = pipe_feat["invert_level_end_point"]
+ intermediate_bottom_levels[point] = pipe_feat["invert_level_end"]
else:
geom = QgsGeometry.fromPointXY(point)
existing_node_feat = find_point_nodes(point, connection_node_layer)
if existing_node_feat is not None:
new_node_feat = existing_node_feat
- existing_manhole_feat = find_point_nodes(point, manhole_layer)
- if existing_manhole_feat is None:
- new_manhole_feat = manhole_handler.create_new_feature(geom)
- new_manhole_feat["connection_node_id"] = new_node_feat["id"]
- else:
- new_manhole_feat = existing_manhole_feat
- intermediate_bottom_levels[point] = new_manhole_feat["bottom_level"]
points_connection_nodes[point] = new_node_feat["id"]
+ intermediate_bottom_levels[point] = existing_node_feat["bottom_level"]
else:
- extra_feats = manhole_handler.create_manhole_with_connection_node(
- geom, template_feat=manhole_template
+ new_node_feat = connection_node_handler.create_new_feature_from_template(
+ connection_node_template, geom
)
- new_manhole_feat, new_node_feat = extra_feats
points_connection_nodes[point] = new_node_feat["id"]
- intermediate_bottom_levels[point] = new_manhole_feat["bottom_level"]
+ intermediate_bottom_levels[point] = new_node_feat["bottom_level"]
connection_node_handler.layer.addFeature(new_node_feat)
- manhole_handler.layer.addFeature(new_manhole_feat)
# Split pipe into segments
segments = zip(pipe_polyline, pipe_polyline[1:])
# Extract first segment and update source pipe
first_seg_start_point, first_seg_end_point = next(segments)
new_source_pipe_geom = QgsGeometry.fromPolylineXY([first_seg_start_point, first_seg_end_point])
pipe_feat.setGeometry(new_source_pipe_geom)
- pipe_feat["connection_node_end_id"] = points_connection_nodes[first_seg_end_point]
+ pipe_feat["connection_node_id_end"] = points_connection_nodes[first_seg_end_point]
if first_seg_end_point in intermediate_bottom_levels:
- pipe_feat["invert_level_end_point"] = intermediate_bottom_levels[first_seg_end_point]
+ pipe_feat["invert_level_end"] = intermediate_bottom_levels[first_seg_end_point]
self.layer.updateFeature(pipe_feat)
# Let's add a new pipes
- skip_fields = ["connection_node_start_id", "connection_node_end_id"]
+ skip_fields = ["connection_node_id_start", "connection_node_id_end"]
for start_point, end_point in segments:
new_geom = QgsGeometry.fromPolylineXY([start_point, end_point])
new_feat = self.create_new_feature_from_template(pipe_feat, geometry=new_geom, fields_to_skip=skip_fields)
- new_feat["connection_node_start_id"] = points_connection_nodes[start_point]
- new_feat["connection_node_end_id"] = points_connection_nodes[end_point]
+ new_feat["connection_node_id_start"] = points_connection_nodes[start_point]
+ new_feat["connection_node_id_end"] = points_connection_nodes[end_point]
if start_point in intermediate_bottom_levels:
- new_feat["invert_level_start_point"] = intermediate_bottom_levels[start_point]
+ new_feat["invert_level_start"] = intermediate_bottom_levels[start_point]
if end_point in intermediate_bottom_levels:
- new_feat["invert_level_end_point"] = intermediate_bottom_levels[end_point]
+ new_feat["invert_level_end"] = intermediate_bottom_levels[end_point]
self.layer.addFeature(new_feat)
@@ -784,8 +773,8 @@ class CrossSectionLocationHandler(UserLayerHandler):
"length": 0.8,
"width": 0.8,
"shape": ManholeShape.ROUND.value,
- "manhole_indicator": ManholeIndicator.INSPECTION.value,
- "calculation_type": CalculationTypeNode.ISOLATED.value,
+ "visualisation": Visualisation.INSPECTION.value,
+ "exchange_type": ExchangeTypeNode.ISOLATED.value,
"bottom_level": -10.0,
}
)
@@ -826,11 +815,6 @@ class ChannelHandler(UserLayerHandler):
dm.CrossSectionLocation: float("inf"),
}
)
- DEFAULTS = MappingProxyType(
- {
- "zoom_category": ZoomCategories.LOWEST_VISIBILITY.value,
- }
- )
def connect_additional_signals(self):
"""Connecting signals to action specific for the particular layers."""
@@ -909,20 +893,42 @@ def on_channel_geometry_change(self, channel_fid, new_geometry):
potential_breach_layer.changeGeometry(breach_fid, new_breach_geometry)
+class MaterialHandler(UserLayerHandler):
+ MODEL = dm.Material
+
+
class BoundaryCondition2DHandler(UserLayerHandler):
MODEL = dm.BoundaryCondition2D
+ DEFAULTS = MappingProxyType(
+ {
+ "display_name": "new",
+ "code": "new",
+ "type": BoundaryType.WATER_LEVEL.value,
+ "time_units": TimeUnit.SECONDS.value,
+ }
+ )
class Lateral2DHandler(UserLayerHandler):
MODEL = dm.Lateral2D
+ DEFAULTS = MappingProxyType(
+ {
+ "display_name": "new",
+ "code": "new",
+ "offset": 0,
+ "type": Later2DType.SURFACE.value,
+ "units": Unit.M3_SECONDS.value,
+ "time_units": TimeUnit.SECONDS.value,
+ }
+ )
-class LinearObstacleHandler(UserLayerHandler):
- MODEL = dm.LinearObstacle
+class ObstacleHandler(UserLayerHandler):
+ MODEL = dm.Obstacle
-class GridRefinementHandler(UserLayerHandler):
- MODEL = dm.GridRefinement
+class GridRefinementLineHandler(UserLayerHandler):
+ MODEL = dm.GridRefinementLine
class GridRefinementAreaHandler(UserLayerHandler):
@@ -933,8 +939,8 @@ class DEMAverageAreaHandler(UserLayerHandler):
MODEL = dm.DEMAverageArea
-class WindshieldingHandler(UserLayerHandler):
- MODEL = dm.Windshielding
+class Windshielding1DHandler(UserLayerHandler):
+ MODEL = dm.Windshielding1D
class PotentialBreachHandler(UserLayerHandler):
@@ -997,32 +1003,6 @@ class ExchangeLineHandler(UserLayerHandler):
)
-class ImperviousSurfaceHandler(UserLayerHandler):
- MODEL = dm.ImperviousSurface
-
- def connect_additional_signals(self):
- """Connecting signals to action specific for the particular layers."""
- self.layer.geometryChanged.connect(self.update_surface_link)
-
- def disconnect_additional_signals(self):
- """Disconnecting signals to action specific for the particular layers."""
- self.layer.geometryChanged.disconnect(self.update_surface_link)
-
- def update_surface_link(self, feat_id, geometry):
- """Update geometry of the surface - node link."""
- surface_handler = self.layer_manager.model_handlers[dm.ImperviousSurface]
- surface_layer = surface_handler.layer
- surface_link_handler = self.layer_manager.model_handlers[dm.ImperviousSurfaceMap]
- surface_link_layer = surface_link_handler.layer
- surface_feat = surface_layer.getFeature(feat_id)
- link_feat = surface_link_handler.get_feat_by_id(surface_feat["id"], "impervious_surface_id")
- point = geometry.centroid().asPoint()
- link_linestring = link_feat.geometry().asPolyline()
- link_linestring[0] = point
- link_new_geom = QgsGeometry.fromPolylineXY(link_linestring)
- surface_link_layer.changeGeometry(link_feat.id(), link_new_geom)
-
-
class SurfaceHandler(UserLayerHandler):
MODEL = dm.Surface
@@ -1049,8 +1029,8 @@ def update_surface_link(self, feat_id, geometry):
surface_link_layer.changeGeometry(link_feat.id(), link_new_geom)
-class ImperviousSurfaceMapHandler(UserLayerHandler):
- MODEL = dm.ImperviousSurfaceMap
+class SurfaceMapHandler(UserLayerHandler):
+ MODEL = dm.SurfaceMap
DEFAULTS = MappingProxyType(
{
"percentage": 100.00,
@@ -1073,7 +1053,7 @@ def trigger_update_link_references(self, feat_id, geometry):
def update_link_references(self, feat_id, geometry):
"""Update references to the connections nodes and surfaces after geometry change."""
node_handler = self.layer_manager.model_handlers[dm.ConnectionNode]
- surface_handler = self.layer_manager.model_handlers[dm.ImperviousSurface]
+ surface_handler = self.layer_manager.model_handlers[dm.Surface]
node_layer = node_handler.layer
surface_layer = surface_handler.layer
layer_fields = self.layer.fields()
@@ -1084,15 +1064,45 @@ def update_link_references(self, feat_id, geometry):
changes = {}
start_surface_id = start_surface_feat["id"] if start_surface_feat else None
end_connection_node_id = end_connection_node_feat["id"] if end_connection_node_feat else None
- start_surface_id_idx = layer_fields.lookupField("impervious_surface_id")
+ start_surface_id_idx = layer_fields.lookupField("surface_id")
end_connection_node_id_idx = layer_fields.lookupField("connection_node_id")
changes[start_surface_id_idx] = start_surface_id
changes[end_connection_node_id_idx] = end_connection_node_id
self.layer.changeAttributeValues(feat_id, changes)
-class SurfaceMapHandler(UserLayerHandler):
- MODEL = dm.SurfaceMap
+class SurfaceParameterHandler(UserLayerHandler):
+ MODEL = dm.SurfaceParameters
+
+
+class DryWeatherFlowHandler(UserLayerHandler):
+ MODEL = dm.DryWeatherFlow
+
+ def connect_additional_signals(self):
+ """Connecting signals to action specific for the particular layers."""
+ self.layer.geometryChanged.connect(self.update_dwf_link)
+
+ def disconnect_additional_signals(self):
+ """Disconnecting signals to action specific for the particular layers."""
+ self.layer.geometryChanged.disconnect(self.update_dwf_link)
+
+ def update_dwf_link(self, feat_id, geometry):
+ """Update geometry of the DWF area - node link."""
+ dwf_handler = self.layer_manager.model_handlers[dm.DryWeatherFlow]
+ dwf_layer = dwf_handler.layer
+ dwf_link_handler = self.layer_manager.model_handlers[dm.DryWeatherFlowMap]
+ dwf_link_layer = dwf_link_handler.layer
+ dwf_feat = dwf_layer.getFeature(feat_id)
+ link_feat = dwf_link_handler.get_feat_by_id(dwf_feat["id"], "dry_weather_flow_id")
+ point = geometry.centroid().asPoint()
+ link_linestring = link_feat.geometry().asPolyline()
+ link_linestring[0] = point
+ link_new_geom = QgsGeometry.fromPolylineXY(link_linestring)
+ dwf_link_layer.changeGeometry(link_feat.id(), link_new_geom)
+
+
+class DryWeatherFlowMapHandler(UserLayerHandler):
+ MODEL = dm.DryWeatherFlowMap
DEFAULTS = MappingProxyType(
{
"percentage": 100.00,
@@ -1115,7 +1125,7 @@ def trigger_update_link_references(self, feat_id, geometry):
def update_link_references(self, feat_id, geometry):
"""Update references to the connections nodes and surfaces after geometry change."""
node_handler = self.layer_manager.model_handlers[dm.ConnectionNode]
- surface_handler = self.layer_manager.model_handlers[dm.Surface]
+ surface_handler = self.layer_manager.model_handlers[dm.DryWeatherFlow]
node_layer = node_handler.layer
surface_layer = surface_handler.layer
layer_fields = self.layer.fields()
@@ -1126,19 +1136,19 @@ def update_link_references(self, feat_id, geometry):
changes = {}
start_surface_id = start_surface_feat["id"] if start_surface_feat else None
end_connection_node_id = end_connection_node_feat["id"] if end_connection_node_feat else None
- start_surface_id_idx = layer_fields.lookupField("surface_id")
+ start_surface_id_idx = layer_fields.lookupField("dry_weather_flow_id")
end_connection_node_id_idx = layer_fields.lookupField("connection_node_id")
changes[start_surface_id_idx] = start_surface_id
changes[end_connection_node_id_idx] = end_connection_node_id
self.layer.changeAttributeValues(feat_id, changes)
-class SurfaceParameterHandler(UserLayerHandler):
- MODEL = dm.SurfaceParameters
+class DryWeatherFlowDistributionHandler(UserLayerHandler):
+ MODEL = dm.DryWeatherFlowDistribution
-class GlobalSettingsHandler(UserLayerHandler):
- MODEL = dm.GlobalSettings
+class ModelSettingsHandler(UserLayerHandler):
+ MODEL = dm.ModelSettings
class AggregationSettingsHandler(UserLayerHandler):
@@ -1157,98 +1167,258 @@ class InterflowSettingsHandler(UserLayerHandler):
MODEL = dm.InterflowSettings
+class InterceptionSettingsHandler(UserLayerHandler):
+ MODEL = dm.InterceptionSettings
+
+
+class InitialConditionsSettingsHandler(UserLayerHandler):
+ MODEL = dm.InitialConditionsSettings
+
+
+class PhysicalSettingsHandler(UserLayerHandler):
+ MODEL = dm.PhysicalSettings
+
+
class NumericalSettingsHandler(UserLayerHandler):
MODEL = dm.NumericalSettings
-class SchemaVersionHandler(UserLayerHandler):
- MODEL = dm.SchemaVersion
+class SimulationTemplateSettingsHandler(UserLayerHandler):
+ MODEL = dm.SimulationTemplateSettings
+
+
+class TimeStepSettingsHandler(UserLayerHandler):
+ MODEL = dm.TimeStepSettings
+
+
+class VegetationDrag2DHandler(UserLayerHandler):
+ MODEL = dm.VegetationDrag2D
+
+
+class TagHandler(UserLayerHandler):
+ MODEL = dm.Tag
+
+
+class AbstractControlHandler(UserLayerHandler):
+
+ @cached_property
+ def target_data_models(self):
+ return {model_cls.__tablename__: model_cls for model_cls in [dm.Pump, dm.Orifice, dm.Weir]}
+
+ def snap_to_target_centroid(self, feat_id):
+ """Move geometry to target centroid (if target is linear)."""
+ feat = self.layer.getFeature(feat_id)
+ target_feat_id = feat["target_id"]
+ if not target_feat_id:
+ return
+ target_type = feat["target_type"]
+ if not target_type:
+ return
+ try:
+ target_model_cls = self.target_data_models[target_type]
+ except KeyError:
+ return
+ if target_model_cls.__geometrytype__ != GeometryType.Linestring:
+ return
+ target_handler = self.layer_manager.model_handlers[target_model_cls]
+ target_layer = target_handler.layer
+ target_feat = target_layer.getFeature(target_feat_id)
+ target_feat_centroid = target_feat.geometry().centroid()
+ new_source_geom = QgsGeometry(target_feat_centroid)
+ feat.setGeometry(new_source_geom)
+ self.layer.updateFeature(feat)
+ def update_target_references(self, feat_id, geometry):
+ """Update references to the target after geometry change."""
+ feature_point = geometry.asPoint()
+ target_feature, target_type = None, None
+ layer_fields = self.layer.fields()
+ for model_cls in self.target_data_models.values():
+ structure_handler = self.layer_manager.model_handlers[model_cls]
+ structure_layer = structure_handler.layer
+ dm_geometry_type = model_cls.__geometrytype__
+ if dm_geometry_type == GeometryType.Point:
+ structure_feat = find_point_nodes(feature_point, structure_layer)
+ elif dm_geometry_type == GeometryType.Linestring:
+ structure_feat = find_point_polyline(feature_point, structure_layer)
+ else:
+ continue
+ if structure_feat is not None:
+ target_feature, target_type = structure_feat, model_cls.__tablename__
+ break
+ target_id = target_feature["id"] if target_feature is not None else None
+ target_id_idx = layer_fields.lookupField("target_id")
+ target_type_idx = layer_fields.lookupField("target_type")
+ changes = {target_id_idx: target_id, target_type_idx: target_type}
+ self.layer.changeAttributeValues(feat_id, changes)
-class VegetationDragHandler(UserLayerHandler):
- MODEL = dm.VegetationDrag
+ def trigger_snap_to_target_centroid(self, feat_id):
+ """Triggering snapping geometry to the target centroid after feature added."""
+ snap_to_target_centroid_method = partial(self.snap_to_target_centroid, feat_id)
+ QTimer.singleShot(0, snap_to_target_centroid_method)
+ def trigger_update_target_references(self, feat_id, geometry):
+ """Triggering update of the target references after feature geometry change."""
+ update_target_references_method = partial(self.update_target_references, feat_id, geometry)
+ QTimer.singleShot(0, update_target_references_method)
-class ControlHandler(UserLayerHandler):
- MODEL = dm.Control
+class MemoryControlHandler(AbstractControlHandler):
+ MODEL = dm.MemoryControl
+ DEFAULTS = MappingProxyType(
+ {
+ "display_name": "new",
+ "code": "new",
+ }
+ )
-class ControlDeltaHandler(UserLayerHandler):
- MODEL = dm.ControlDelta
+ def connect_additional_signals(self):
+ """Connecting signals to action specific for the particular layers."""
+ self.layer.featureAdded.connect(self.trigger_snap_to_target_centroid)
+ self.layer.geometryChanged.connect(self.trigger_update_target_references)
+ def disconnect_additional_signals(self):
+ """Disconnecting signals to action specific for the particular layers."""
+ self.layer.featureAdded.disconnect(self.trigger_snap_to_target_centroid)
+ self.layer.geometryChanged.disconnect(self.trigger_update_target_references)
-class ControlGroupHandler(UserLayerHandler):
- MODEL = dm.ControlGroup
+class TableControlHandler(AbstractControlHandler):
+ MODEL = dm.TableControl
+ DEFAULTS = MappingProxyType(
+ {
+ "display_name": "new",
+ "code": "new",
+ }
+ )
-class ControlMeasureGroupHandler(UserLayerHandler):
- MODEL = dm.ControlMeasureGroup
+ def connect_additional_signals(self):
+ """Connecting signals to action specific for the particular layers."""
+ self.layer.featureAdded.connect(self.trigger_snap_to_target_centroid)
+ self.layer.geometryChanged.connect(self.trigger_update_target_references)
+ def disconnect_additional_signals(self):
+ """Disconnecting signals to action specific for the particular layers."""
+ self.layer.featureAdded.disconnect(self.trigger_snap_to_target_centroid)
+ self.layer.geometryChanged.disconnect(self.trigger_update_target_references)
-class ControlMeasureMapHandler(UserLayerHandler):
- MODEL = dm.ControlMeasureMap
+class MeasureLocationHandler(UserLayerHandler):
+ MODEL = dm.MeasureLocation
+ DEFAULTS = MappingProxyType(
+ {
+ "display_name": "new",
+ "code": "new",
+ }
+ )
-class ControlMemoryHandler(UserLayerHandler):
- MODEL = dm.ControlMemory
+class MeasureMapHandler(UserLayerHandler):
+ MODEL = dm.MeasureMap
+ DEFAULTS = MappingProxyType(
+ {
+ "display_name": "new",
+ "code": "new",
+ "weight": 1.0,
+ }
+ )
-class ControlPIDHandler(UserLayerHandler):
- MODEL = dm.ControlPID
+ @cached_property
+ def control_data_models(self):
+ return {model_cls.__tablename__: model_cls for model_cls in [dm.MemoryControl, dm.TableControl]}
+
+ def update_control_references(self, feat_id, geometry):
+ """Update references to the control and measure location feature after geometry change."""
+ feature_polyline = geometry.asPolyline()
+ feature_start_point, feature_end_point = feature_polyline[0], feature_polyline[-1]
+ control_feature, control_type = None, None
+ layer_fields = self.layer.fields()
+ for model_cls in self.control_data_models.values():
+ control_handler = self.layer_manager.model_handlers[model_cls]
+ control_layer = control_handler.layer
+ control_feat = find_point_nodes(feature_end_point, control_layer)
+ if control_feat is not None:
+ control_feature, control_type = control_feat, model_cls.__tablename__
+ break
+ control_id = control_feature["id"] if control_feature is not None else None
+ control_id_idx = layer_fields.lookupField("control_id")
+ control_type_idx = layer_fields.lookupField("control_type")
+ changes = {control_id_idx: control_id, control_type_idx: control_type}
+ measure_location_handler = self.layer_manager.model_handlers[dm.MeasureLocation]
+ measure_location_layer = measure_location_handler.layer
+ measure_location_feat = find_point_nodes(feature_start_point, measure_location_layer)
+ if measure_location_feat is not None:
+ measure_location_id = measure_location_feat["id"] if measure_location_feat is not None else None
+ measure_location_id_idx = layer_fields.lookupField("control_measure_location_id")
+ changes[measure_location_id_idx] = measure_location_id
+ self.layer.changeAttributeValues(feat_id, changes)
+ def trigger_update_control_references(self, feat_id, geometry):
+ """Triggering update of the control and measure location references after feature geometry change."""
+ update_control_references_method = partial(self.update_control_references, feat_id, geometry)
+ QTimer.singleShot(0, update_control_references_method)
-class ControlTableHandler(UserLayerHandler):
- MODEL = dm.ControlTable
+ def trigger_simplify_measure_map(self, measure_map_id):
+ """Triggering geometry simplification on newly added feature."""
+ simplify_method = partial(self.simplify_linear_feature, measure_map_id)
+ QTimer.singleShot(0, simplify_method)
+ def connect_additional_signals(self):
+ """Connecting signals to action specific for the particular layers."""
+ self.layer.featureAdded.connect(self.trigger_simplify_measure_map)
+ self.layer.geometryChanged.connect(self.trigger_update_control_references)
-class ControlTimedHandler(UserLayerHandler):
- MODEL = dm.ControlTimed
+ def disconnect_additional_signals(self):
+ """Disconnecting signals to action specific for the particular layers."""
+ self.layer.featureAdded.disconnect(self.trigger_simplify_measure_map)
+ self.layer.geometryChanged.disconnect(self.trigger_update_control_references)
ALL_HANDLERS = (
ConnectionNodeHandler,
BoundaryCondition1DHandler,
Lateral1DHandler,
- ManholeHandler,
- PumpstationHandler,
- PumpstationMapHandler,
+ PumpHandler,
+ PumpMapHandler,
WeirHandler,
CulvertHandler,
OrificeHandler,
PipeHandler,
CrossSectionLocationHandler,
+ MaterialHandler,
ChannelHandler,
BoundaryCondition2DHandler,
Lateral2DHandler,
- LinearObstacleHandler,
- GridRefinementHandler,
+ ObstacleHandler,
+ GridRefinementLineHandler,
GridRefinementAreaHandler,
DEMAverageAreaHandler,
- WindshieldingHandler,
+ Windshielding1DHandler,
PotentialBreachHandler,
ExchangeLineHandler,
- ImperviousSurfaceHandler,
SurfaceHandler,
- ImperviousSurfaceMapHandler,
SurfaceMapHandler,
SurfaceParameterHandler,
- GlobalSettingsHandler,
+ DryWeatherFlowHandler,
+ DryWeatherFlowMapHandler,
+ DryWeatherFlowDistributionHandler,
+ ModelSettingsHandler,
AggregationSettingsHandler,
SimpleInfiltrationSettingsHandler,
GroundWaterSettingsHandler,
InterflowSettingsHandler,
+ InitialConditionsSettingsHandler,
+ InterceptionSettingsHandler,
NumericalSettingsHandler,
- SchemaVersionHandler,
- VegetationDragHandler,
- ControlHandler,
- ControlDeltaHandler,
- ControlGroupHandler,
- ControlMeasureGroupHandler,
- ControlMeasureMapHandler,
- ControlMemoryHandler,
- ControlPIDHandler,
- ControlTableHandler,
- ControlTimedHandler,
+ PhysicalSettingsHandler,
+ SimulationTemplateSettingsHandler,
+ TimeStepSettingsHandler,
+ TagHandler,
+ VegetationDrag2DHandler,
+ MeasureMapHandler,
+ MeasureLocationHandler,
+ MemoryControlHandler,
+ TableControlHandler,
)
MODEL_HANDLERS = MappingProxyType({handler.MODEL: handler for handler in ALL_HANDLERS})
diff --git a/threedi_schematisation_editor/user_layer_manager.py b/threedi_schematisation_editor/user_layer_manager.py
index c29ea45..93d1eca 100644
--- a/threedi_schematisation_editor/user_layer_manager.py
+++ b/threedi_schematisation_editor/user_layer_manager.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
import os
import re
from functools import cached_property
@@ -7,6 +7,8 @@
from qgis.core import (
Qgis,
+ QgsEditFormConfig,
+ QgsEditorWidgetSetup,
QgsExpression,
QgsFeatureRequest,
QgsProject,
@@ -50,12 +52,20 @@ class LayersManager:
("1D", dm.MODEL_1D_ELEMENTS),
("1D2D", dm.MODEL_1D2D_ELEMENTS),
("2D", dm.MODEL_2D_ELEMENTS),
- ("Inflow", dm.INFLOW_ELEMENTS),
- ("Control structures", dm.CONTROL_STRUCTURES_ELEMENTS),
+ ("Laterals & 0D inflow", dm.MODEL_0D_INFLOW_ELEMENTS),
+ ("Structure control", dm.STRUCTURE_CONTROL_ELEMENTS),
+ ("Hydrological processes", dm.HYDROLOGICAL_PROCESSES),
("Settings", dm.SETTINGS_ELEMENTS),
)
- RASTER_GROUPS = (("Model rasters", dm.ELEMENTS_WITH_RASTERS),)
+ RASTER_GROUPS = (("Rasters", dm.ELEMENTS_WITH_RASTERS),)
LAYER_JOINS = MappingProxyType({})
+ VALUE_RELATIONS = MappingProxyType(
+ {
+ # parent model: (child model, parent column, child key column, child value column)
+ dm.Surface: (dm.SurfaceParameters, "surface_parameters_id", "id", "description"),
+ dm.DryWeatherFlow: (dm.DryWeatherFlowDistribution, "dry_weather_flow_distribution_id", "id", "description"),
+ }
+ )
def __init__(self, iface, user_communication, model_gpkg_path):
self.iface = iface
@@ -72,22 +82,25 @@ def __init__(self, iface, user_communication, model_gpkg_path):
def snapping_groups(self):
snap_groups = {
dm.ConnectionNode: {
- dm.Manhole,
dm.Pipe,
dm.Weir,
dm.Orifice,
dm.Culvert,
- dm.Pumpstation,
- dm.PumpstationMap,
+ dm.Pump,
+ dm.PumpMap,
dm.Channel,
dm.SurfaceMap,
- dm.ImperviousSurfaceMap,
+ dm.DryWeatherFlowMap,
dm.Lateral1D,
dm.BoundaryCondition1D,
+ dm.MeasureLocation,
},
dm.Channel: {dm.ConnectionNode, dm.CrossSectionLocation, dm.PotentialBreach},
dm.CrossSectionLocation: {dm.Channel},
dm.PotentialBreach: {dm.Channel},
+ dm.MemoryControl: {dm.Pump, dm.Orifice, dm.Weir},
+ dm.TableControl: {dm.Pump, dm.Orifice, dm.Weir},
+ dm.MeasureMap: {dm.MemoryControl, dm.TableControl},
}
for model_cls in dm.ALL_MODELS:
if model_cls.__geometrytype__ == en.GeometryType.NoGeometry:
@@ -102,7 +115,7 @@ def validate_layers(self, return_raw_errors=False):
"""Validate all layers registered within handlers."""
fixed_errors, unsolved_errors = [], []
handlers_count = len(self.model_handlers)
- msg = "Validating data before the export..."
+ msg = "Validating layers data..."
self.uc.progress_bar(msg, 0, handlers_count, 0, clear_msg_bar=True)
QCoreApplication.processEvents()
for i, handler in enumerate(self.model_handlers.values(), start=1):
@@ -141,17 +154,23 @@ def set_layers_snapping(self, layer_handler):
snap_config.setMode(QgsSnappingConfig.AdvancedConfiguration)
snap_config.setIntersectionSnapping(True)
individual_configs = snap_config.individualLayerSettings()
+ vertex_segment_snapping_models = {
+ dm.CrossSectionLocation,
+ dm.PotentialBreach,
+ dm.TableControl,
+ dm.MemoryControl,
+ }
try:
snap_type = (
Qgis.SnappingTypes(Qgis.SnappingType.Vertex | Qgis.SnappingType.Segment)
- if layer_model in {dm.CrossSectionLocation, dm.PotentialBreach}
+ if layer_model in vertex_segment_snapping_models
else Qgis.SnappingType.Vertex
)
except AttributeError:
# Backward compatibility for QGIS versions before introducing `Qgis.SnappingTypes`
snap_type = (
QgsSnappingConfig.VertexFlag | QgsSnappingConfig.SegmentFlag
- if layer_model in {dm.CrossSectionLocation, dm.PotentialBreach}
+ if layer_model in vertex_segment_snapping_models
else QgsSnappingConfig.VertexFlag
)
for layer in snapped_layers:
@@ -183,11 +202,12 @@ def common_editing_group(self):
dm.MODEL_1D_ELEMENTS
+ dm.MODEL_1D2D_ELEMENTS
+ (
- dm.ImperviousSurface,
- dm.ImperviousSurfaceMap,
+ dm.DryWeatherFlow,
+ dm.DryWeatherFlowMap,
dm.Surface,
dm.SurfaceMap,
)
+ + dm.STRUCTURE_CONTROL_ELEMENTS
)
return linked_models
@@ -276,6 +296,24 @@ def unregister_custom_functions():
QgsExpression.unregisterFunction("cross_section_max_height")
QgsExpression.unregisterFunction("cross_section_max_width")
+ def setup_value_relation_widgets(self):
+ """Setup value relation widget."""
+ for parent_model_cls, (
+ child_model_cls,
+ parent_column,
+ key_column,
+ value_column,
+ ) in self.VALUE_RELATIONS.items():
+ parent_layer = self.model_handlers[parent_model_cls].layer
+ parent_column_idx = parent_layer.fields().lookupField(parent_column)
+ child_layer = self.model_handlers[child_model_cls].layer
+ default_ews = parent_layer.editorWidgetSetup(parent_column_idx)
+ config = default_ews.config()
+ config["Layer"] = child_layer.id()
+ config["LayerSource"] = child_layer.source()
+ ews = QgsEditorWidgetSetup(default_ews.type(), config)
+ parent_layer.setEditorWidgetSetup(parent_column_idx, ews)
+
def create_groups(self):
"""Creating all User Layers groups."""
self.remove_groups()
@@ -339,10 +377,16 @@ def initialize_data_model_layer(self, model_cls):
default_edit_form_config = layer.editFormConfig()
if form_ui_path:
default_edit_form_config.setUiForm(form_ui_path)
+ try:
+ default_edit_form_config.setInitCodeSource(Qgis.AttributeFormPythonInitCodeSource.Dialog)
+ except AttributeError:
+ default_edit_form_config.setInitCodeSource(QgsEditFormConfig.PythonInitCodeSource.Dialog)
+ default_edit_form_config.setInitFunction("open_edit_form")
+ default_edit_form_config.setInitCode("from threedi_schematisation_editor.utils import open_edit_form")
+ set_field_default_value(layer, "id", "")
else:
- if model_cls != dm.SchemaVersion:
- id_increment_expression = "if (maximum(id) is null, 1, maximum(id) + 1)"
- set_field_default_value(layer, "id", id_increment_expression)
+ id_increment_expression = "if (maximum(id) is null, 1, maximum(id) + 1)"
+ set_field_default_value(layer, "id", id_increment_expression)
for style in all_styles:
style_manager.setCurrentStyle(style)
layer.setEditFormConfig(default_edit_form_config)
@@ -398,7 +442,7 @@ def load_raster_layers(self):
relative_path = feat[raster_file_field]
if not relative_path:
continue
- raster_filepath = os.path.normpath(os.path.join(gpkg_dir, relative_path))
+ raster_filepath = os.path.normpath(os.path.join(gpkg_dir, "rasters", relative_path))
if not os.path.isfile(raster_filepath):
continue
rlayer = QgsRasterLayer(raster_filepath, raster_layer_name)
@@ -423,6 +467,7 @@ def load_all_layers(self, from_project=False):
self.remove_loaded_layers(dry_remove=True)
self.register_groups()
self.register_vector_layers()
+ self.setup_value_relation_widgets()
self.iface.setActiveLayer(self.model_handlers[dm.ConnectionNode].layer)
def remove_loaded_layers(self, dry_remove=False):
diff --git a/threedi_schematisation_editor/utils.py b/threedi_schematisation_editor/utils.py
index 5b84794..d507827 100644
--- a/threedi_schematisation_editor/utils.py
+++ b/threedi_schematisation_editor/utils.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
import os
import shutil
import sys
@@ -13,7 +13,6 @@
NULL,
QgsBilinearRasterResampler,
QgsCoordinateTransform,
- QgsDataSourceUri,
QgsEditorWidgetSetup,
QgsExpression,
QgsFeature,
@@ -54,24 +53,14 @@
}
-def backup_sqlite(filename):
- """Make a backup of the sqlite database."""
+def backup_schematisation_file(filename):
+ """Make a backup of the schematisation file."""
backup_folder = os.path.join(os.path.dirname(os.path.dirname(filename)), "_backup")
os.makedirs(backup_folder, exist_ok=True)
prefix = str(uuid4())[:8]
- backup_sqlite_path = os.path.join(backup_folder, f"{prefix}_{os.path.basename(filename)}")
- shutil.copyfile(filename, backup_sqlite_path)
- return backup_sqlite_path
-
-
-def cast_if_bool(value):
- """Function for changing True/False from GeoPackage layers to 0/1 integers used in Spatialite layers."""
- if value is True:
- return 1
- elif value is False:
- return 0
- else:
- return value
+ backup_file_path = os.path.join(backup_folder, f"{prefix}_{os.path.basename(filename)}")
+ shutil.copyfile(filename, backup_file_path)
+ return backup_file_path
def vector_layer_factory(annotated_model_cls, epsg=4326):
@@ -140,7 +129,7 @@ def layer_to_gpkg(layer, gpkg_filename, overwrite=False, driver_name="GPKG"):
QgsVectorFileWriter.CreateOrOverwriteLayer if overwrite is False else QgsVectorFileWriter.CreateOrOverwriteFile
)
fields = layer.fields()
- valid_indexes = [fields.lookupField(fname) for fname in fields.names() if fname != "fid"]
+ valid_indexes = [fields.lookupField(fname) for fname in fields.names()]
options.attributes = valid_indexes
options.driverName = driver_name
options.layerName = layer.name()
@@ -156,22 +145,6 @@ def gpkg_layer(gpkg_path, table_name, layer_name=None):
return vlayer
-def sqlite_layer(sqlite_path, table_name, layer_name=None, geom_column="the_geom", schema=""):
- """Creating vector layer out of Spatialite source."""
- uri = QgsDataSourceUri()
- uri.setDatabase(sqlite_path)
- uri.setDataSource(schema, table_name, geom_column)
- layer_name = table_name if layer_name is None else layer_name
- vlayer = QgsVectorLayer(uri.uri(), layer_name, "spatialite")
- return vlayer
-
-
-def create_empty_model(export_sqlite_path):
- """Copying Spatialite database template with 3Di model data structure."""
- empty_sqlite = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data", "empty.sqlite")
- shutil.copy(empty_sqlite, export_sqlite_path)
-
-
def get_qml_style_path(style_name, *subfolders):
"""Getting QML styles path."""
qml_filename = f"{style_name}.qml"
@@ -185,7 +158,11 @@ def get_multiple_qml_style_paths(styles_folder_name, *subfolders):
"""Getting QML styles paths within given styles folder."""
styles_folder_path = os.path.join(os.path.dirname(__file__), "styles", *subfolders, styles_folder_name)
if os.path.exists(styles_folder_path):
- qml_paths = [os.path.join(styles_folder_path, q) for q in os.listdir(styles_folder_path) if q.endswith(".qml")]
+ qml_paths = [
+ os.path.normpath(os.path.join(styles_folder_path, q))
+ for q in os.listdir(styles_folder_path)
+ if q.endswith(".qml")
+ ]
else:
qml_paths = []
return qml_paths
@@ -194,12 +171,18 @@ def get_multiple_qml_style_paths(styles_folder_name, *subfolders):
def get_form_ui_path(table_name):
"""Getting UI form path for a given table name."""
ui_filename = f"{table_name}.ui"
- filepath = os.path.join(os.path.dirname(__file__), "forms", "ui", ui_filename)
+ filepath = os.path.normpath(os.path.join(os.path.dirname(__file__), "forms", "ui", ui_filename))
if os.path.isfile(filepath):
return filepath
return None
+def get_icon_path(icon_filename, root_dir=None):
+ """Getting icon path for a given icon file."""
+ icon_filepath = os.path.join(os.path.dirname(__file__) if root_dir is None else root_dir, "icons", icon_filename)
+ return icon_filepath
+
+
def create_tree_group(name, insert_at_top=False, root=None):
"""Creating layer tree group with given name."""
root = QgsProject.instance().layerTreeRoot() if root is None else root
@@ -295,7 +278,6 @@ def set_initial_layer_configuration(layer, model_cls):
fields = layer.dataProvider().fields()
columns = attr_table_config.columns()
model_hidden_fields = model_cls.hidden_fields()
- model_hidden_fields.add("fid")
for column in columns:
column_name = column.name
if column_name in model_hidden_fields:
@@ -333,7 +315,7 @@ def load_user_layers(gpkg_path):
groups = OrderedDict()
groups["1D"] = dm.MODEL_1D_ELEMENTS
groups["2D"] = dm.MODEL_2D_ELEMENTS
- groups["Inflow"] = dm.INFLOW_ELEMENTS
+ groups["Inflow"] = dm.MODEL_0D_INFLOW_ELEMENTS
groups["Settings"] = dm.SETTINGS_ELEMENTS
default_style_name = "default"
for group_name, group_models in groups.items():
@@ -376,7 +358,7 @@ def load_user_layers(gpkg_path):
def load_model_raster_layers(gpkg_path):
"""Loading raster layers related with 3Di model."""
gpkg_dir = os.path.dirname(gpkg_path)
- group_name = "Model rasters"
+ group_name = "Rasters"
get_tree_group(group_name)
for settings_cls in dm.SETTINGS_ELEMENTS:
if settings_cls.RELATED_RASTERS is None:
@@ -402,7 +384,16 @@ def load_model_raster_layers(gpkg_path):
def remove_user_layers():
"""Removing all 3Di model User Layers and rasters from the map canvas."""
- groups = ["1D", "2D", "Inflow", "Settings", "Model rasters"]
+ groups = [
+ "1D",
+ "1D2D",
+ "2D",
+ "Laterals & 0D inflow",
+ "Structure control",
+ "Hydrological processes",
+ "Settings",
+ "Rasters",
+ ]
for group_name in groups:
remove_group_with_children(group_name)
@@ -612,7 +603,7 @@ def get_feature_by_id(layer, object_id, id_field="id"):
def add_settings_entry(gpkg_path, **initial_fields_values):
"""Adding initial settings entry with defined fields values."""
- settings_layer = gpkg_layer(gpkg_path, dm.GlobalSettings.__tablename__)
+ settings_layer = gpkg_layer(gpkg_path, dm.ModelSettings.__tablename__)
if settings_layer.featureCount() == 0:
settings_fields = settings_layer.fields()
settings_feat = QgsFeature(settings_fields)
@@ -703,24 +694,24 @@ def modify_raster_style(raster_layer, limits=QgsRasterMinMaxOrigin.MinMax, exten
raster_layer.setRenderer(renderer)
-def migrate_spatialite_schema(sqlite_filepath):
+def migrate_schematisation_schema(schematisation_filepath):
migration_succeed = False
try:
from threedi_schema import ThreediDatabase, errors
- threedi_db = ThreediDatabase(sqlite_filepath)
+ threedi_db = ThreediDatabase(schematisation_filepath)
schema = threedi_db.schema
- backup_filepath = backup_sqlite(sqlite_filepath)
- schema.upgrade(backup=False, upgrade_spatialite_version=True)
- schema.set_spatial_indexes()
+ backup_filepath = backup_schematisation_file(schematisation_filepath)
+ # schema.upgrade(backup=False, convert_to_geopackage=True)
+ schema.convert_to_geopackage()
shutil.rmtree(os.path.dirname(backup_filepath))
migration_succeed = True
migration_feedback_msg = "Migration succeed."
except ImportError:
- migration_feedback_msg = "Missing threedi-schema library. Schema migration failed."
+ migration_feedback_msg = "Missing threedi-schema library (or its dependencies). Schema migration failed."
except errors.UpgradeFailedError:
migration_feedback_msg = (
- "The spatialite database schema cannot be migrated to the current version. "
+ "The schematisation database schema cannot be migrated to the current version. "
"Please contact the service desk for assistance."
)
except Exception as e:
@@ -750,59 +741,6 @@ def bypass_max_path_limit(path, is_file=False):
return valid_path
-def ensure_valid_schema(schematisation_sqlite, communication):
- """Check if schema version is up-to-date and migrate it if needed."""
- try:
- from threedi_schema import ThreediDatabase, errors
- except ImportError:
- return
- schematisation_dirname = os.path.dirname(schematisation_sqlite)
- schematisation_filename = os.path.basename(schematisation_sqlite)
- backup_folder = os.path.join(schematisation_dirname, "_backup")
- os.makedirs(bypass_max_path_limit(backup_folder), exist_ok=True)
- prefix = str(uuid4())[:8]
- backup_sqlite_path = os.path.join(backup_folder, f"{prefix}_{schematisation_filename}")
- shutil.copyfile(schematisation_sqlite, bypass_max_path_limit(backup_sqlite_path, is_file=True))
- threedi_db = ThreediDatabase(schematisation_sqlite)
- schema = threedi_db.schema
- try:
- schema.validate_schema()
- schema.set_spatial_indexes()
- except errors.MigrationMissingError:
- warn_and_ask_msg = (
- "The selected spatialite cannot be used because its database schema version is out of date. "
- "Would you like to migrate your spatialite to the current schema version?"
- )
- do_migration = communication.ask(None, "Missing migration", warn_and_ask_msg)
- if not do_migration:
- return False
- try:
- schema.upgrade(backup=False, upgrade_spatialite_version=True)
- schema.set_spatial_indexes()
- shutil.rmtree(backup_folder)
- except errors.MigrationMissingError as e:
- if "This tool cannot update versions below 160" in str(e):
- error_msg = (
- "This tool cannot update versions below 160. " "Please contact the service desk for assistance."
- )
- communication.show_error(error_msg)
- return False
- else:
- raise e
- except errors.UpgradeFailedError:
- error_msg = (
- "The spatialite database schema cannot be migrated to the current version. "
- "Please contact the service desk for assistance."
- )
- communication.show_error(error_msg)
- return False
- except Exception as e:
- error_msg = f"{e}"
- communication.show_error(error_msg)
- return False
- return True
-
-
def validation_errors_summary(validation_errors):
"""Create validation summary message grouped by the data model class."""
summary_per_model = []
@@ -972,7 +910,7 @@ def setup_friction_and_vegetation_widgets(custom_form, cross_section_shape_widge
related_widget.setDisabled(True)
cross_section_shape = custom_form.get_widget_value(cross_section_shape_widget)
friction_value = custom_form.get_widget_value(friction_widget)
- custom_form.update_cross_section_table_header("cross_section_friction_table")
+ custom_form.update_cross_section_table_header("cross_section_friction_values")
custom_form.update_cross_section_table_header("cross_section_vegetation_table")
if not custom_form.layer.isEditable():
return
@@ -1070,3 +1008,54 @@ def extract_substring(linestring_geometry, start_distance, end_distance):
before_start_geometry = QgsGeometry(before_start_substring)
after_end_geometry = QgsGeometry(after_end_substring)
return substring_geometry, before_start_geometry, after_end_geometry
+
+
+# def ensure_valid_schema(schematisation_filepath, communication):
+# """Check if schema version is up-to-date and migrate it if needed."""
+# try:
+# from threedi_schema import ThreediDatabase, errors
+# except ImportError:
+# return
+# schematisation_dirname = os.path.dirname(schematisation_filepath)
+# schematisation_filename = os.path.basename(schematisation_filepath)
+# backup_folder = os.path.join(schematisation_dirname, "_backup")
+# os.makedirs(bypass_max_path_limit(backup_folder), exist_ok=True)
+# prefix = str(uuid4())[:8]
+# backup_filepath = os.path.join(backup_folder, f"{prefix}_{schematisation_filename}")
+# shutil.copyfile(schematisation_filepath, bypass_max_path_limit(backup_filepath, is_file=True))
+# threedi_db = ThreediDatabase(schematisation_filepath)
+# schema = threedi_db.schema
+# try:
+# schema.validate_schema()
+# except errors.MigrationMissingError:
+# warn_and_ask_msg = (
+# "The selected geopackage cannot be used because its database schema version is out of date. "
+# "Would you like to migrate your geopackage to the current schema version?"
+# )
+# do_migration = communication.ask(None, "Missing migration", warn_and_ask_msg)
+# if not do_migration:
+# return False
+# try:
+# schema.upgrade(backup=False, upgrade_schema_version=True)
+# shutil.rmtree(backup_folder)
+# except errors.MigrationMissingError as e:
+# if "This tool cannot update versions below 160" in str(e):
+# error_msg = (
+# "This tool cannot update versions below 160. " "Please contact the service desk for assistance."
+# )
+# communication.show_error(error_msg)
+# return False
+# else:
+# raise e
+# except errors.UpgradeFailedError:
+# error_msg = (
+# "The geopackage database schema cannot be migrated to the current version. "
+# "Please contact the service desk for assistance."
+# )
+# communication.show_error(error_msg)
+# return False
+# except Exception as e:
+# error_msg = f"{e}"
+# communication.show_error(error_msg)
+# return False
+# return True
diff --git a/threedi_schematisation_editor/validators.py b/threedi_schematisation_editor/validators.py
index 02542e9..6f42cf1 100644
--- a/threedi_schematisation_editor/validators.py
+++ b/threedi_schematisation_editor/validators.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2023 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
from functools import cached_property
from itertools import chain
diff --git a/threedi_schematisation_editor/workspace.py b/threedi_schematisation_editor/workspace.py
index 509c133..bc0cfcf 100644
--- a/threedi_schematisation_editor/workspace.py
+++ b/threedi_schematisation_editor/workspace.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2024 by Lutra Consulting
+# Copyright (C) 2025 by Lutra Consulting
class WorkspaceContextManager:
diff --git a/zip_plugin.py b/zip_plugin.py
index 6d69604..3208624 100644
--- a/zip_plugin.py
+++ b/zip_plugin.py
@@ -1,5 +1,5 @@
# 3Di Schematisation Editor for QGIS, licensed under GPLv2 or (at your option) any later version
-# Copyright (C) 2023 by Lutra Consulting for 3Di Water Management
+# Copyright (C) 2025 by Lutra Consulting for 3Di Water Management
import os
import re
import shutil