From a3a353c1d943df30ce9a433321d653e6b74db92c Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 3 Jul 2024 09:53:23 +0200 Subject: [PATCH] =?UTF-8?q?SQL=20Views:=20Tilf=C3=B8j=20`IN=5FDKCORS`=20at?= =?UTF-8?q?tribut=20til=20RTK-tjeneste=20net?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Formålet er, at kunne skælne mellem tjenestens egne stationer og vores stationer, fx på et kort. --- sql/views.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sql/views.sql b/sql/views.sql index 79d2785f..8073e96d 100644 --- a/sql/views.sql +++ b/sql/views.sql @@ -766,6 +766,11 @@ WITH SELECT geometri, punktid FROM geometriobjekt go WHERE go.registreringtil IS NULL ), + dkcors AS ( + SELECT pi.punktid, 'TRUE' AS dkcors FROM punktinfo pi + JOIN punktinfotype pit ON pi.infotypeid=pit.infotypeid + WHERE pit.infotype='NET:CORS' AND pi.registreringtil IS NULL + ), tabtgaaet AS ( SELECT pi.punktid, 'TRUE' AS tabtgaaet FROM punktinfo pi JOIN punktinfotype pit ON pi.infotypeid=pit.infotypeid @@ -776,6 +781,7 @@ SELECT gnss_ident.ident GNSS_NAVN, landsnr.ident LANDSNR, ekstern_ident.ident EKSTERN_IDENT, + dkcors.dkcors IN_DKCORS, etrs89.t ETRS89_T, etrs89.x ETRS89_LON, etrs89.y ETRS89_LAT, @@ -789,6 +795,7 @@ LEFT JOIN ekstern_ident ON punkter.punktid=ekstern_ident.punktid LEFT JOIN etrs89 ON punkter.punktid=etrs89.punktid LEFT JOIN dvr90 ON punkter.punktid=dvr90.punktid LEFT JOIN tabtgaaet ON punkter.punktid=tabtgaaet.punktid +LEFT JOIN dkcors ON punkter.punktid=dkcors.punktid JOIN geometrier ON punkter.punktid=geometrier.punktid WHERE tabtgaaet.tabtgaaet IS NULL; @@ -848,6 +855,11 @@ WITH SELECT geometri, punktid FROM geometriobjekt go WHERE go.registreringtil IS NULL ), + dkcors AS ( + SELECT pi.punktid, 'TRUE' AS dkcors FROM punktinfo pi + JOIN punktinfotype pit ON pi.infotypeid=pit.infotypeid + WHERE pit.infotype='NET:CORS' AND pi.registreringtil IS NULL + ), tabtgaaet AS ( SELECT pi.punktid, 'TRUE' AS tabtgaaet FROM punktinfo pi JOIN punktinfotype pit ON pi.infotypeid=pit.infotypeid @@ -858,6 +870,7 @@ SELECT gnss_ident.ident GNSS_NAVN, landsnr.ident LANDSNR, ekstern_ident.ident EKSTERN_IDENT, + dkcors.dkcors IN_DKCORS, etrs89.t ETRS89_T, etrs89.x ETRS89_LON, etrs89.y ETRS89_LAT, @@ -871,6 +884,7 @@ LEFT JOIN ekstern_ident ON punkter.punktid=ekstern_ident.punktid LEFT JOIN etrs89 ON punkter.punktid=etrs89.punktid LEFT JOIN dvr90 ON punkter.punktid=dvr90.punktid LEFT JOIN tabtgaaet ON punkter.punktid=tabtgaaet.punktid +LEFT JOIN dkcors ON punkter.punktid=dkcors.punktid JOIN geometrier ON punkter.punktid=geometrier.punktid WHERE tabtgaaet.tabtgaaet IS NULL; @@ -929,6 +943,11 @@ WITH SELECT geometri, punktid FROM geometriobjekt go WHERE go.registreringtil IS NULL ), + dkcors AS ( + SELECT pi.punktid, 'TRUE' AS dkcors FROM punktinfo pi + JOIN punktinfotype pit ON pi.infotypeid=pit.infotypeid + WHERE pit.infotype='NET:CORS' AND pi.registreringtil IS NULL + ), tabtgaaet AS ( SELECT pi.punktid, 'TRUE' AS tabtgaaet FROM punktinfo pi JOIN punktinfotype pit ON pi.infotypeid=pit.infotypeid @@ -939,6 +958,7 @@ SELECT gnss_ident.ident GNSS_NAVN, landsnr.ident LANDSNR, ekstern_ident.ident EKSTERN_IDENT, + dkcors.dkcors IN_DKCORS, etrs89.t ETRS89_T, etrs89.x ETRS89_LON, etrs89.y ETRS89_LAT, @@ -952,6 +972,7 @@ LEFT JOIN ekstern_ident ON punkter.punktid=ekstern_ident.punktid LEFT JOIN etrs89 ON punkter.punktid=etrs89.punktid LEFT JOIN dvr90 ON punkter.punktid=dvr90.punktid LEFT JOIN tabtgaaet ON punkter.punktid=tabtgaaet.punktid +LEFT JOIN dkcors ON punkter.punktid=dkcors.punktid JOIN geometrier ON punkter.punktid=geometrier.punktid WHERE tabtgaaet.tabtgaaet IS NULL;