Mercurial > gemma
comparison schema/gemma.sql @ 690:f595b3455d75
Schema: Add view for waterway axis
* Use view to help geoserver serve WFS 1.1.0. Also change client
to ask for the new name instead of the original table.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Thu, 20 Sep 2018 14:15:32 +0200 |
parents | ef658c66cfca |
children | 77928a3497f1 |
comparison
equal
deleted
inserted
replaced
688:89b497d0ee0f | 690:f595b3455d75 |
---|---|
277 NOT NULL REFERENCES distance_mark_functions, | 277 NOT NULL REFERENCES distance_mark_functions, |
278 -- XXX: attribute "function" in DRC 2.1.7 as well as CATDIS seem | 278 -- XXX: attribute "function" in DRC 2.1.7 as well as CATDIS seem |
279 -- to encode the same thing as the object code in ISRS location code. | 279 -- to encode the same thing as the object code in ISRS location code. |
280 position_code char(2) NOT NULL REFERENCES position_codes | 280 position_code char(2) NOT NULL REFERENCES position_codes |
281 ) | 281 ) |
282 | |
283 -- A table to help geoserver serve the distance marks as WFS 1.1.0. | |
284 -- At least geoserver-2.13.2 does not serve type geography correctly | |
285 -- and does not serve the location_code as isrs type | |
286 CREATE VIEW waterway.distance_marks_geoserver AS | |
287 SELECT location_code::VARCHAR, | |
288 geom::Geometry(POINT, 4326), | |
289 distance_mark_function, | |
290 position_code, | |
291 (location_code).hectometre | |
292 FROM waterway.distance_marks; | |
282 | 293 |
283 CREATE TABLE sections_stretches ( | 294 CREATE TABLE sections_stretches ( |
284 id varchar PRIMARY KEY, | 295 id varchar PRIMARY KEY, |
285 is_section boolean NOT NULL, -- maps 'function' from interface | 296 is_section boolean NOT NULL, -- maps 'function' from interface |
286 stretch isrsrange, | 297 stretch isrsrange, |