Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create vw_reaches_with_blank_connections.sql #236

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions view/additional_views/vw_reaches_with_blank_connections.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
DROP VIEW IF EXISTS qgep_od.vw_reaches_with_blank_connections;


--------
-- View that shows all reaches with blank connections (Blindanschlüsse). Can be used for visualisation
-- Author Urs Kaufmann 19.6.2024
--------

CREATE OR REPLACE VIEW qgep_od.vw_reaches_with_blank_connections AS

SELECT re.obj_id,
re.progression_geometry,
ch.function_hierarchic,
reto.obj_id AS to_obj_id
FROM qgep_od.reach re
LEFT JOIN qgep_od.reach_point rpto ON rpto.obj_id::text = re.fk_reach_point_to::text
LEFT JOIN qgep_od.wastewater_networkelement neto ON neto.obj_id::text = rpto.fk_wastewater_networkelement::text
LEFT JOIN qgep_od.reach reto ON reto.obj_id::text = neto.obj_id::text
LEFT JOIN qgep_od.wastewater_networkelement ne ON ne.obj_id::text = re.obj_id::text
LEFT JOIN qgep_od.channel ch ON ch.obj_id::text = ne.fk_wastewater_structure::text
WHERE reto.obj_id IS NOT NULL;
Loading