Skip to content

Commit

Permalink
fix(updates): Fix the geom of the flowregulators of previous commit f…
Browse files Browse the repository at this point in the history
…or child views.
  • Loading branch information
nkarki7 committed Jan 13, 2025
1 parent fa185e7 commit 1d79012
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions updates/40/40000/ud/ddlview.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6346,7 +6346,7 @@ DROP VIEW IF EXISTS v_edit_flwreg_frorifice;
CREATE OR REPLACE VIEW v_edit_flwreg_frorifice as
SELECT fr.*, st_setsrid(st_linesubstring(CASE WHEN ST_Equals(ST_StartPoint(a.the_geom), n.the_geom)
THEN a.the_geom
ELSE ST_Reverse(a.the_geom) end, 0, b.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
ELSE ST_Reverse(a.the_geom) end, 0, fr.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
AS the_geom
FROM inp_flwreg_orifice fr
JOIN v_edit_node n ON fr.node_id::text = n.node_id::TEXT
Expand All @@ -6360,7 +6360,7 @@ DROP VIEW IF EXISTS v_edit_flwreg_frweir;
CREATE OR REPLACE VIEW v_edit_flwreg_frweir AS
SELECT fr.*, st_setsrid(st_linesubstring(CASE WHEN ST_Equals(ST_StartPoint(a.the_geom), n.the_geom)
THEN a.the_geom
ELSE ST_Reverse(a.the_geom) end, 0, b.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
ELSE ST_Reverse(a.the_geom) end, 0, fr.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
AS the_geom
FROM inp_flwreg_weir fr
JOIN v_edit_node n ON fr.node_id::text = n.node_id::TEXT
Expand All @@ -6374,7 +6374,7 @@ DROP VIEW IF EXISTS v_edit_flwreg_froutlet;
CREATE OR REPLACE VIEW v_edit_flwreg_froutlet AS
SELECT fr.*, st_setsrid(st_linesubstring(CASE WHEN ST_Equals(ST_StartPoint(a.the_geom), n.the_geom)
THEN a.the_geom
ELSE ST_Reverse(a.the_geom) end, 0, b.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
ELSE ST_Reverse(a.the_geom) end, 0, fr.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
AS the_geom
FROM inp_flwreg_outlet fr
JOIN v_edit_node n ON fr.node_id::text = n.node_id::TEXT
Expand All @@ -6389,7 +6389,7 @@ DROP VIEW IF EXISTS v_edit_flwreg_frpump;
CREATE OR REPLACE VIEW v_edit_flwreg_frpump AS
SELECT fr.*, st_setsrid(st_linesubstring(CASE WHEN ST_Equals(ST_StartPoint(a.the_geom), n.the_geom)
THEN a.the_geom
ELSE ST_Reverse(a.the_geom) end, 0, b.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
ELSE ST_Reverse(a.the_geom) end, 0, fr.flwreg_length / st_length(a.the_geom)),SRID_VALUE)::geometry(LineString,SRID_VALUE)
AS the_geom
FROM inp_flwreg_pump fr
JOIN v_edit_node n ON fr.node_id::text = n.node_id::TEXT
Expand Down

0 comments on commit 1d79012

Please sign in to comment.