Skip to content

Commit 902c1e8

Browse files
authored
Merge pull request #236 from QGEP/2024-06-19-add-view-blank_connection
Create vw_reaches_with_blank_connections.sql
2 parents 10851f7 + c2ca6e4 commit 902c1e8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
DROP VIEW IF EXISTS qgep_od.vw_reaches_with_blank_connections;
2+
3+
4+
--------
5+
-- View that shows all reaches with blank connections (Blindanschlüsse). Can be used for visualisation
6+
-- Author Urs Kaufmann 19.6.2024
7+
--------
8+
9+
CREATE OR REPLACE VIEW qgep_od.vw_reaches_with_blank_connections AS
10+
11+
SELECT re.obj_id,
12+
re.progression_geometry,
13+
ch.function_hierarchic,
14+
reto.obj_id AS to_obj_id
15+
FROM qgep_od.reach re
16+
LEFT JOIN qgep_od.reach_point rpto ON rpto.obj_id::text = re.fk_reach_point_to::text
17+
LEFT JOIN qgep_od.wastewater_networkelement neto ON neto.obj_id::text = rpto.fk_wastewater_networkelement::text
18+
LEFT JOIN qgep_od.reach reto ON reto.obj_id::text = neto.obj_id::text
19+
LEFT JOIN qgep_od.wastewater_networkelement ne ON ne.obj_id::text = re.obj_id::text
20+
LEFT JOIN qgep_od.channel ch ON ch.obj_id::text = ne.fk_wastewater_structure::text
21+
WHERE reto.obj_id IS NOT NULL;

0 commit comments

Comments
 (0)