From cd1fc7403a51a6f4f7d753ce1559f25a88fbb0e0 Mon Sep 17 00:00:00 2001 From: SJiB Date: Wed, 24 Apr 2024 14:26:27 +0200 Subject: [PATCH 01/14] replace InitDepth, SurchargeDepth and PondArea with 0.0 instead of NULL - SWMM 5.1. seems not to like NULL values in these colums and throws an error --- swmm_views/02_vw_swmm_junctions.sql | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/swmm_views/02_vw_swmm_junctions.sql b/swmm_views/02_vw_swmm_junctions.sql index bd3ce9cf..6c354997 100644 --- a/swmm_views/02_vw_swmm_junctions.sql +++ b/swmm_views/02_vw_swmm_junctions.sql @@ -8,9 +8,9 @@ SELECT wn.obj_id as Name, coalesce(wn.bottom_level,0) as InvertElev, (co.level-wn.bottom_level) as MaxDepth, - NULL::float as InitDepth, - NULL::float as SurchargeDepth, - NULL::float as PondedArea, + 0.0::float as InitDepth, + 0.0::float as SurchargeDepth, + 0.0::float as PondedArea, ws.identifier::text as description, CONCAT_WS(',', 'manhole', mf.value_en) as tag, wn.situation_geometry as geom, @@ -41,9 +41,9 @@ SELECT wn.obj_id as Name, coalesce(wn.bottom_level,0) as InvertElev, (co.level-wn.bottom_level) as MaxDepth, - NULL::float as InitDepth, - NULL::float as SurchargeDepth, - NULL::float as PondedArea, + 0.0::float as InitDepth, + 0.0::float as SurchargeDepth, + 0.0::float as PondedArea, ws.identifier::text as description, CONCAT_WS(',','special_structure', ss_fu.value_en) as tag, wn.situation_geometry as geom, @@ -106,9 +106,9 @@ SELECT coalesce(from_wn.obj_id, concat('from_node@',re.obj_id)) as Name, coalesce(from_wn.bottom_level, 0) as InvertElev, 0 as MaxDepth, - NULL::float as InitDepth, - NULL::float as SurchargeDepth, - NULL::float as PondedArea, + 0.0::float as InitDepth, + 0.0::float as SurchargeDepth, + 0.0::float as PondedArea, coalesce(from_wn.obj_id, concat('from_node@',re.obj_id)) as description, 'junction without structure' as tag, coalesce(from_wn.situation_geometry, ST_StartPoint(re.progression_geometry)) as geom, @@ -142,9 +142,9 @@ SELECT coalesce(to_wn.obj_id, concat('to_node@',re.obj_id)) as Name, coalesce(to_wn.bottom_level, 0) as InvertElev, 0 as MaxDepth, - NULL::float as InitDepth, - NULL::float as SurchargeDepth, - NULL::float as PondedArea, + 0.0::float as InitDepth, + 0.0::float as SurchargeDepth, + 0.0::float as PondedArea, coalesce(to_wn.obj_id, concat('to_node@',re.obj_id)) as description, 'junction without structure' as tag, coalesce(to_wn.situation_geometry, ST_EndPoint(re.progression_geometry)) as geom, From 6c199c98bb539205121b7c004867f47ef864cd96 Mon Sep 17 00:00:00 2001 From: SJiB Date: Wed, 24 Apr 2024 14:30:11 +0200 Subject: [PATCH 02/14] xsection - default 0 instead of NULL for Culvert and geom2 else case --- swmm_views/02_vw_swmm_junctions.sql | 6 +++--- swmm_views/23_vw_swmm_xsections.sql | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/swmm_views/02_vw_swmm_junctions.sql b/swmm_views/02_vw_swmm_junctions.sql index 6c354997..2bc8a10a 100644 --- a/swmm_views/02_vw_swmm_junctions.sql +++ b/swmm_views/02_vw_swmm_junctions.sql @@ -8,9 +8,9 @@ SELECT wn.obj_id as Name, coalesce(wn.bottom_level,0) as InvertElev, (co.level-wn.bottom_level) as MaxDepth, - 0.0::float as InitDepth, - 0.0::float as SurchargeDepth, - 0.0::float as PondedArea, + 0.0::float as InitDepth, -- default set to 0 instead of NULL + 0.0::float as SurchargeDepth, -- default set to 0 instead of NULL + 0.0::float as PondedArea, -- default set to 0 instead of NULL ws.identifier::text as description, CONCAT_WS(',', 'manhole', mf.value_en) as tag, wn.situation_geometry as geom, diff --git a/swmm_views/23_vw_swmm_xsections.sql b/swmm_views/23_vw_swmm_xsections.sql index 33774607..4430135d 100644 --- a/swmm_views/23_vw_swmm_xsections.sql +++ b/swmm_views/23_vw_swmm_xsections.sql @@ -31,14 +31,14 @@ SELECT DISTINCT WHEN pp.height_width_ratio IS NULL THEN 0.002 --ROMA: TODO default value for width to be set ELSE 0.002 --ROMA: TODO default value for width to be set END - ELSE NULL + ELSE 0 -- default set to 0 instead of NULL END as Geom2, --Geom3 = code -> used only for arch profile, but this code value is nowhere to be set in the QGEP model 0 as Geom3, 0 as Geom4, 1 as Barrels, - NULL as Culvert, - CASE + 0 as Culvert, -- default set to 0 instead of NULL + CASE WHEN ws_st.vsacode IN (7959, 6529, 6526) THEN 'planned' ELSE 'current' END as state, From 7e15178e88c986faea087d0d8d2d28d69679ee06 Mon Sep 17 00:00:00 2001 From: SJiB Date: Mon, 17 Jun 2024 17:41:03 +0200 Subject: [PATCH 03/14] Adapt 08_vw_smm_outfalls.sql --- swmm_views/08_vw_swmm_outfalls.sql | 48 ++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/swmm_views/08_vw_swmm_outfalls.sql b/swmm_views/08_vw_swmm_outfalls.sql index 0017eac6..1b554593 100644 --- a/swmm_views/08_vw_swmm_outfalls.sql +++ b/swmm_views/08_vw_swmm_outfalls.sql @@ -6,22 +6,30 @@ CREATE OR REPLACE VIEW qgep_swmm.vw_outfalls AS SELECT wn.obj_id as Name, coalesce(wn.bottom_level,0) as InvertElev, - 'FREE'::varchar as Type, - NULL as StageData, +-- 'FREE'::varchar as Type, + CASE + WHEN waterlevel_hydraulic NOT IS NULL THEN 'FIXED' + ELSE 'FREE' + END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations +-- 0 as StageData, + CASE + WHEN waterlevel_hydraulic NOT IS NULL THEN waterlevel_hydraulic + ELSE 0 + END as StageData, 'NO'::varchar as tide_gate, - NULL::varchar as RouteTo, + '0'::varchar as RouteTo, ws.identifier as description, dp.obj_id::varchar as tag, wn.situation_geometry as geom, - CASE - WHEN ws_st.vsacode IN (7959, 6529, 6526) THEN 'planned' - ELSE 'current' - END as state, - CASE - WHEN cfhi.vsacode in (5062, 5064, 5066, 5068, 5069, 5070, 5071, 5072, 5074) THEN 'primary' - ELSE 'secondary' - END as hierarchy, - wn.obj_id as obj_id + CASE + WHEN ws_st.vsacode IN (7959, 6529, 6526) THEN 'planned' + ELSE 'current' + END as state, + CASE + WHEN cfhi.vsacode in (5062, 5064, 5066, 5068, 5069, 5070, 5071, 5072, 5074) THEN 'primary' + ELSE 'secondary' + END as hierarchy, + wn.obj_id as obj_id FROM qgep_od.discharge_point as dp LEFT JOIN qgep_od.wastewater_structure ws ON ws.obj_id::text = dp.obj_id::text LEFT JOIN qgep_vl.wastewater_structure_status ws_st ON ws.status = ws_st.code @@ -36,10 +44,18 @@ UNION SELECT wn.obj_id as Name, coalesce(wn.bottom_level,0) as InvertElev, - 'FREE'::varchar as Type, - NULL as StageData, +-- 'FREE'::varchar as Type, + CASE + WHEN waterlevel_hydraulic NOT IS NULL THEN 'FIXED' + ELSE 'FREE' + END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations +-- 0 as StageData, + CASE + WHEN waterlevel_hydraulic NOT IS NULL THEN waterlevel_hydraulic + ELSE 0 + END as StageData, 'NO'::varchar as tide_gate, - NULL::varchar as RouteTo, + '0'::varchar as RouteTo, ws.identifier as description, ii.obj_id::varchar as tag, wn.situation_geometry as geom, @@ -52,6 +68,7 @@ SELECT ELSE 'secondary' END as hierarchy, wn.obj_id as obj_id + FROM qgep_od.infiltration_installation as ii LEFT JOIN qgep_od.wastewater_structure ws ON ws.obj_id::text = ii.obj_id::text LEFT JOIN qgep_vl.wastewater_structure_status ws_st ON ws.status = ws_st.code @@ -60,4 +77,5 @@ LEFT JOIN qgep_od.wastewater_networkelement we ON we.fk_wastewater_structure::te LEFT JOIN qgep_od.wastewater_node wn on wn.obj_id = we.obj_id WHERE wn.obj_id IS NOT NULL AND ws_st.vsacode IN (6530, 6533, 8493, 6529, 6526, 7959) + ; From f477ef36d5a137ef48543fdf9339887c934880de Mon Sep 17 00:00:00 2001 From: SJiB Date: Mon, 17 Jun 2024 18:00:10 +0200 Subject: [PATCH 04/14] add comments to 12_vw_swmm_raingages.sql --- swmm_views/12_vw_swmm_raingages.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swmm_views/12_vw_swmm_raingages.sql b/swmm_views/12_vw_swmm_raingages.sql index cfdac4cc..f0f2df20 100644 --- a/swmm_views/12_vw_swmm_raingages.sql +++ b/swmm_views/12_vw_swmm_raingages.sql @@ -2,10 +2,10 @@ CREATE OR REPLACE VIEW qgep_swmm.vw_raingages AS SELECT ('raingage@' || replace(ca.obj_id, ' ', '_'))::varchar as Name, - 'INTENSITY'::varchar as Format, - '0:15'::varchar as Interval, - '1.0'::varchar as SCF, - 'TIMESERIES default_qgep_raingage_timeserie'::varchar as Source, + 'INTENSITY'::varchar as Format, -- Format in which the rain data are supplied: INTENSITY: each rainfall value is an average rate in inches/hour (or mm/hour) over the recording interval. VOLUME: each rainfall value is the volume of rain that fell in the recording interval (in inches or millimeters). CUMULATIVE: each rainfall value represents the cumulative rainfall that has occurred since the start of the last series of non-zero values (in inches or millimeters). + '0:15'::varchar as Interval, -- Recording time interval between gage readings in decimal hours or hours:minutes format. + '1.0'::varchar as SCF, -- Snow Catch Factor Factor that corrects gage readings for snowfall. + 'TIMESERIES default_qgep_raingage_timeserie'::varchar as Source, -- Source of rainfall data; either TIMESERIES for user-defined time series data or FILE for an external data file. st_centroid(perimeter_geometry)::geometry(Point, %(SRID)s) as geom, state, CASE From 0e4a396db11b4a12293ad8f2b514f0f39dc3d83f Mon Sep 17 00:00:00 2001 From: SJiB Date: Mon, 17 Jun 2024 18:02:24 +0200 Subject: [PATCH 05/14] reference to swmm Documentation --- swmm_views/12_vw_swmm_raingages.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swmm_views/12_vw_swmm_raingages.sql b/swmm_views/12_vw_swmm_raingages.sql index f0f2df20..c17c3f37 100644 --- a/swmm_views/12_vw_swmm_raingages.sql +++ b/swmm_views/12_vw_swmm_raingages.sql @@ -5,7 +5,7 @@ SELECT 'INTENSITY'::varchar as Format, -- Format in which the rain data are supplied: INTENSITY: each rainfall value is an average rate in inches/hour (or mm/hour) over the recording interval. VOLUME: each rainfall value is the volume of rain that fell in the recording interval (in inches or millimeters). CUMULATIVE: each rainfall value represents the cumulative rainfall that has occurred since the start of the last series of non-zero values (in inches or millimeters). '0:15'::varchar as Interval, -- Recording time interval between gage readings in decimal hours or hours:minutes format. '1.0'::varchar as SCF, -- Snow Catch Factor Factor that corrects gage readings for snowfall. - 'TIMESERIES default_qgep_raingage_timeserie'::varchar as Source, -- Source of rainfall data; either TIMESERIES for user-defined time series data or FILE for an external data file. + 'TIMESERIES default_qgep_raingage_timeserie'::varchar as Source, -- Source of rainfall data; either TIMESERIES for user-defined time series data or FILE for an external data file. see Rain Gage Properties of SWMM Documentation for furhter information. st_centroid(perimeter_geometry)::geometry(Point, %(SRID)s) as geom, state, CASE From bf70686b1692edd81e3d8313a89652e46aacd359 Mon Sep 17 00:00:00 2001 From: SJiB Date: Mon, 17 Jun 2024 19:16:01 +0200 Subject: [PATCH 06/14] delta_1.6.sql --- delta/delta_1.6.2_adatpt_swmm_views | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 delta/delta_1.6.2_adatpt_swmm_views diff --git a/delta/delta_1.6.2_adatpt_swmm_views b/delta/delta_1.6.2_adatpt_swmm_views new file mode 100644 index 00000000..96fe19c2 --- /dev/null +++ b/delta/delta_1.6.2_adatpt_swmm_views @@ -0,0 +1,4 @@ +-------- +-- Corrections to swmm views 12_vw_swmm_raingages, 08_vw_swmm_outfalls, 02_vw_swmm_junctions and 23_vw_swmm_xsections +-------- +SELECT 1; From b35e63ab04653dd056c5f032148721e2a59d887c Mon Sep 17 00:00:00 2001 From: SJiB Date: Mon, 17 Jun 2024 19:16:45 +0200 Subject: [PATCH 07/14] delta_1.6.2_noop.sql --- delta/{delta_1.6.0_noop.sql => delta_1.6.2_noop.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename delta/{delta_1.6.0_noop.sql => delta_1.6.2_noop.sql} (100%) diff --git a/delta/delta_1.6.0_noop.sql b/delta/delta_1.6.2_noop.sql similarity index 100% rename from delta/delta_1.6.0_noop.sql rename to delta/delta_1.6.2_noop.sql From 9d18d8b230d3bda450f06cc860fc62f4815eb964 Mon Sep 17 00:00:00 2001 From: SJiB Date: Mon, 17 Jun 2024 19:32:41 +0200 Subject: [PATCH 08/14] adapt current_version.txt --- system/CURRENT_VERSION.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/system/CURRENT_VERSION.txt b/system/CURRENT_VERSION.txt index 266146b8..2f217f9b 100644 --- a/system/CURRENT_VERSION.txt +++ b/system/CURRENT_VERSION.txt @@ -1 +1,2 @@ 1.6.3 + From 1d930760987a429cfdf9481bc6ecdb3727f02fce Mon Sep 17 00:00:00 2001 From: SJiB Date: Fri, 2 Aug 2024 10:33:29 +0200 Subject: [PATCH 09/14] Rename 1.6.2_adapt_swmm_views --- ...delta_1.6.2_adatpt_swmm_views => delta_1.6.2_adapt_swmm_views} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename delta/{delta_1.6.2_adatpt_swmm_views => delta_1.6.2_adapt_swmm_views} (100%) diff --git a/delta/delta_1.6.2_adatpt_swmm_views b/delta/delta_1.6.2_adapt_swmm_views similarity index 100% rename from delta/delta_1.6.2_adatpt_swmm_views rename to delta/delta_1.6.2_adapt_swmm_views From 6aa47f9dba014f5a733b0e0e055e0113c959037b Mon Sep 17 00:00:00 2001 From: SJiB Date: Fri, 2 Aug 2024 10:37:10 +0200 Subject: [PATCH 10/14] delete noop / add .sql --- ..._1.6.2_adapt_swmm_views => delta_1.6.2_adapt_swmm_views.sql} | 0 delta/delta_1.6.2_noop.sql | 2 -- 2 files changed, 2 deletions(-) rename delta/{delta_1.6.2_adapt_swmm_views => delta_1.6.2_adapt_swmm_views.sql} (100%) delete mode 100644 delta/delta_1.6.2_noop.sql diff --git a/delta/delta_1.6.2_adapt_swmm_views b/delta/delta_1.6.2_adapt_swmm_views.sql similarity index 100% rename from delta/delta_1.6.2_adapt_swmm_views rename to delta/delta_1.6.2_adapt_swmm_views.sql diff --git a/delta/delta_1.6.2_noop.sql b/delta/delta_1.6.2_noop.sql deleted file mode 100644 index f97ae929..00000000 --- a/delta/delta_1.6.2_noop.sql +++ /dev/null @@ -1,2 +0,0 @@ --- noop delta, used only to unambigously define the datamodel version -SELECT 1; From 25b6a76af7913ac7531f847617ccad950e8ac81e Mon Sep 17 00:00:00 2001 From: Arnaud Poncet-Montanges Date: Thu, 22 Aug 2024 08:14:34 +0200 Subject: [PATCH 11/14] Fix_syntax_IS_NOT_sql --- swmm_views/08_vw_swmm_outfalls.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swmm_views/08_vw_swmm_outfalls.sql b/swmm_views/08_vw_swmm_outfalls.sql index 1b554593..7452a069 100644 --- a/swmm_views/08_vw_swmm_outfalls.sql +++ b/swmm_views/08_vw_swmm_outfalls.sql @@ -8,12 +8,12 @@ SELECT coalesce(wn.bottom_level,0) as InvertElev, -- 'FREE'::varchar as Type, CASE - WHEN waterlevel_hydraulic NOT IS NULL THEN 'FIXED' + WHEN waterlevel_hydraulic IS NOT NULL THEN 'FIXED' ELSE 'FREE' END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations -- 0 as StageData, CASE - WHEN waterlevel_hydraulic NOT IS NULL THEN waterlevel_hydraulic + WHEN waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic ELSE 0 END as StageData, 'NO'::varchar as tide_gate, @@ -46,12 +46,12 @@ SELECT coalesce(wn.bottom_level,0) as InvertElev, -- 'FREE'::varchar as Type, CASE - WHEN waterlevel_hydraulic NOT IS NULL THEN 'FIXED' + WHEN waterlevel_hydraulic IS NOT NULL THEN 'FIXED' ELSE 'FREE' END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations -- 0 as StageData, CASE - WHEN waterlevel_hydraulic NOT IS NULL THEN waterlevel_hydraulic + WHEN waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic ELSE 0 END as StageData, 'NO'::varchar as tide_gate, From 1a33dde2a5cdf6c72c00b04f1ee7e34d3b62a0f8 Mon Sep 17 00:00:00 2001 From: SJiB Date: Fri, 15 Nov 2024 11:02:28 +0100 Subject: [PATCH 12/14] dp.water_lvel_hydraulic --- swmm_views/08_vw_swmm_outfalls.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swmm_views/08_vw_swmm_outfalls.sql b/swmm_views/08_vw_swmm_outfalls.sql index 7452a069..c8d3aefe 100644 --- a/swmm_views/08_vw_swmm_outfalls.sql +++ b/swmm_views/08_vw_swmm_outfalls.sql @@ -8,12 +8,12 @@ SELECT coalesce(wn.bottom_level,0) as InvertElev, -- 'FREE'::varchar as Type, CASE - WHEN waterlevel_hydraulic IS NOT NULL THEN 'FIXED' + WHEN dp.waterlevel_hydraulic IS NOT NULL THEN 'FIXED' ELSE 'FREE' END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations -- 0 as StageData, CASE - WHEN waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic + WHEN dp.waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic ELSE 0 END as StageData, 'NO'::varchar as tide_gate, @@ -46,12 +46,12 @@ SELECT coalesce(wn.bottom_level,0) as InvertElev, -- 'FREE'::varchar as Type, CASE - WHEN waterlevel_hydraulic IS NOT NULL THEN 'FIXED' + WHEN dp.waterlevel_hydraulic IS NOT NULL THEN 'FIXED' ELSE 'FREE' END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations -- 0 as StageData, CASE - WHEN waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic + WHEN dp.waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic ELSE 0 END as StageData, 'NO'::varchar as tide_gate, From 0f04a862db237ac9a7cd64ebe6e23a31658d28da Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:17:37 +0000 Subject: [PATCH 13/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- swmm_views/08_vw_swmm_outfalls.sql | 8 ++++---- swmm_views/23_vw_swmm_xsections.sql | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/swmm_views/08_vw_swmm_outfalls.sql b/swmm_views/08_vw_swmm_outfalls.sql index c8d3aefe..3ea84064 100644 --- a/swmm_views/08_vw_swmm_outfalls.sql +++ b/swmm_views/08_vw_swmm_outfalls.sql @@ -7,12 +7,12 @@ SELECT wn.obj_id as Name, coalesce(wn.bottom_level,0) as InvertElev, -- 'FREE'::varchar as Type, - CASE + CASE WHEN dp.waterlevel_hydraulic IS NOT NULL THEN 'FIXED' ELSE 'FREE' END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations -- 0 as StageData, - CASE + CASE WHEN dp.waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic ELSE 0 END as StageData, @@ -45,12 +45,12 @@ SELECT wn.obj_id as Name, coalesce(wn.bottom_level,0) as InvertElev, -- 'FREE'::varchar as Type, - CASE + CASE WHEN dp.waterlevel_hydraulic IS NOT NULL THEN 'FIXED' ELSE 'FREE' END as Type, -- Type of outfall boundary condition: FREE: outfall stage determined by minimum of critical flow depth and normal flow depth in the connecting conduit. NORMAL: outfall stage based on normal flow depth in the connecting conduit. FIXED: outfall stage set to a fixed value. TIDAL: outfall stage given by a table of tide elevation versus time of day. TIMESERIES: outfall stage supplied from a time series of elevations -- 0 as StageData, - CASE + CASE WHEN dp.waterlevel_hydraulic IS NOT NULL THEN waterlevel_hydraulic ELSE 0 END as StageData, diff --git a/swmm_views/23_vw_swmm_xsections.sql b/swmm_views/23_vw_swmm_xsections.sql index 4430135d..842a3046 100644 --- a/swmm_views/23_vw_swmm_xsections.sql +++ b/swmm_views/23_vw_swmm_xsections.sql @@ -38,7 +38,7 @@ SELECT DISTINCT 0 as Geom4, 1 as Barrels, 0 as Culvert, -- default set to 0 instead of NULL - CASE + CASE WHEN ws_st.vsacode IN (7959, 6529, 6526) THEN 'planned' ELSE 'current' END as state, From 09064316b1cd5cfb4554037b7a41052bc79706cc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:47:52 +0000 Subject: [PATCH 14/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- swmm_views/08_vw_swmm_outfalls.sql | 4 ++-- system/CURRENT_VERSION.txt | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/swmm_views/08_vw_swmm_outfalls.sql b/swmm_views/08_vw_swmm_outfalls.sql index 3ea84064..5f79ad01 100644 --- a/swmm_views/08_vw_swmm_outfalls.sql +++ b/swmm_views/08_vw_swmm_outfalls.sql @@ -21,11 +21,11 @@ SELECT ws.identifier as description, dp.obj_id::varchar as tag, wn.situation_geometry as geom, - CASE + CASE WHEN ws_st.vsacode IN (7959, 6529, 6526) THEN 'planned' ELSE 'current' END as state, - CASE + CASE WHEN cfhi.vsacode in (5062, 5064, 5066, 5068, 5069, 5070, 5071, 5072, 5074) THEN 'primary' ELSE 'secondary' END as hierarchy, diff --git a/system/CURRENT_VERSION.txt b/system/CURRENT_VERSION.txt index 2f217f9b..266146b8 100644 --- a/system/CURRENT_VERSION.txt +++ b/system/CURRENT_VERSION.txt @@ -1,2 +1 @@ 1.6.3 -