changeset 821:d32516051d08

Add view to help geoserver serve contour lines
author Tom Gottfried <tom@intevation.de>
date Thu, 27 Sep 2018 18:32:55 +0200
parents d025e1f5e71d
children 8926c413db21
files schema/gemma.sql
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/schema/gemma.sql	Thu Sep 27 17:58:56 2018 +0200
+++ b/schema/gemma.sql	Thu Sep 27 18:32:55 2018 +0200
@@ -418,6 +418,17 @@
         lines geography(multilinestringz, 4326) NOT NULL,
         UNIQUE (sounding_result_id, height)
     )
+    -- A view to help geoserver serve contour lines.
+    -- At least geoserver-2.13.2 does not serve type geography correctly
+    CREATE VIEW waterway.sounding_results_contour_lines_geoserver AS
+        SELECT bottleneck_id,
+                date_info,
+                height,
+                CAST(lines AS geometry(multilinestringz, 4326)) AS lines
+            FROM waterway.sounding_results_contour_lines cl
+                JOIN waterway.sounding_results sr
+                    ON sr.id = cl.sounding_result_id
+
     --
     -- Fairway availability
     --