From 52787e166e914ad7607b91f5b3e6cc1a69335e60 Mon Sep 17 00:00:00 2001 From: leendertvanwolfswinkel Date: Mon, 18 Sep 2023 20:36:56 +0200 Subject: [PATCH] rename z_coordinate to bottom_level in change_in_wl preset --- tool_statistics/presets.py | 6 +- tool_statistics/style.py | 2 +- tool_statistics/style/change_water_level.qml | 226 +------------------ 3 files changed, 6 insertions(+), 228 deletions(-) diff --git a/tool_statistics/presets.py b/tool_statistics/presets.py index d8a4ee79..e3a39fab 100644 --- a/tool_statistics/presets.py +++ b/tool_statistics/presets.py @@ -104,8 +104,8 @@ def aggregations(self): CHANGE_WL_PRESETS = Preset( name="Change in water level", description="Calculates the difference in water level (last - first). In the styling " - "NULL values (when the cell is dry) are replaced by the cells lowest " - "pixel elevation (z_coordinate).", + "NULL values (when the cell is dry) are replaced by the cell's lowest " + "pixel elevation (bottom_level).", aggregations=change_wl_aggregations, cells_style=STYLE_CHANGE_WL, cells_style_param_values={"first": "s1_first", "last": "s1_last"}, @@ -256,7 +256,7 @@ def aggregations(self): WATER_ON_STREET_DURATION_PRESET = Preset( name="Water on street duration", - description="Duration of waterlevel above manhole drain level.", + description="Duration of water level above manhole drain level.", aggregations=water_on_street_aggregations, nodes_style=STYLE_WATER_ON_STREET_DURATION_NODE, nodes_style_param_values={"column": "s1_time_above_threshold"}, diff --git a/tool_statistics/style.py b/tool_statistics/style.py index 42b56a2f..2484451b 100644 --- a/tool_statistics/style.py +++ b/tool_statistics/style.py @@ -108,7 +108,7 @@ def style_change_water_level(layer, qml: str, first: str, last: str): layer.loadNamedStyle(qml) class_attribute_string = ( - f"((coalesce({last}, z_coordinate))-(coalesce({first}, z_coordinate)))" + f"((coalesce({last}, bottom_level))-(coalesce({first}, bottom_level)))" ) layer.renderer().setClassAttribute(class_attribute_string) # layer.renderer().deleteAllClasses() diff --git a/tool_statistics/style/change_water_level.qml b/tool_statistics/style/change_water_level.qml index f66c07ad..f52b2f77 100644 --- a/tool_statistics/style/change_water_level.qml +++ b/tool_statistics/style/change_water_level.qml @@ -1,11 +1,6 @@ - - 1 - 1 - 1 - - + @@ -440,221 +435,4 @@ - - - - - - - 0 - 0 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - generatedlayout - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "id" - - 2 - + \ No newline at end of file