comparison schema/gemma.sql @ 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 34ea9d5df653
children fa417ff1f355
comparison
equal deleted inserted replaced
820:d025e1f5e71d 821:d32516051d08
416 sounding_result_id int NOT NULL REFERENCES sounding_results, 416 sounding_result_id int NOT NULL REFERENCES sounding_results,
417 height numeric NOT NULL, 417 height numeric NOT NULL,
418 lines geography(multilinestringz, 4326) NOT NULL, 418 lines geography(multilinestringz, 4326) NOT NULL,
419 UNIQUE (sounding_result_id, height) 419 UNIQUE (sounding_result_id, height)
420 ) 420 )
421 -- A view to help geoserver serve contour lines.
422 -- At least geoserver-2.13.2 does not serve type geography correctly
423 CREATE VIEW waterway.sounding_results_contour_lines_geoserver AS
424 SELECT bottleneck_id,
425 date_info,
426 height,
427 CAST(lines AS geometry(multilinestringz, 4326)) AS lines
428 FROM waterway.sounding_results_contour_lines cl
429 JOIN waterway.sounding_results sr
430 ON sr.id = cl.sounding_result_id
431
421 -- 432 --
422 -- Fairway availability 433 -- Fairway availability
423 -- 434 --
424 CREATE TABLE fairway_availability ( 435 CREATE TABLE fairway_availability (
425 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, 436 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,