# HG changeset patch # User Bernhard Reiter # Date 1537445732 -7200 # Node ID f595b3455d75127aaa65ac627ef5c3085d31afdd # Parent 89b497d0ee0f1ebbbe81e9492ec3b4889931e3e3 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. diff -r 89b497d0ee0f -r f595b3455d75 client/src/map/Maplayer.vue --- a/client/src/map/Maplayer.vue Thu Sep 20 12:45:00 2018 +0200 +++ b/client/src/map/Maplayer.vue Thu Sep 20 14:15:32 2018 +0200 @@ -205,7 +205,7 @@ srsName: "EPSG:3857", featureNS: "gemma", featurePrefix: "gemma", - featureTypes: ["distance_marks"], + featureTypes: ["distance_marks_geoserver"], outputFormat: "application/json" }); diff -r 89b497d0ee0f -r f595b3455d75 schema/gemma.sql --- a/schema/gemma.sql Thu Sep 20 12:45:00 2018 +0200 +++ b/schema/gemma.sql Thu Sep 20 14:15:32 2018 +0200 @@ -280,6 +280,17 @@ position_code char(2) NOT NULL REFERENCES position_codes ) + -- A table to help geoserver serve the distance marks as WFS 1.1.0. + -- At least geoserver-2.13.2 does not serve type geography correctly + -- and does not serve the location_code as isrs type + CREATE VIEW waterway.distance_marks_geoserver AS + SELECT location_code::VARCHAR, + geom::Geometry(POINT, 4326), + distance_mark_function, + position_code, + (location_code).hectometre + FROM waterway.distance_marks; + CREATE TABLE sections_stretches ( id varchar PRIMARY KEY, is_section boolean NOT NULL, -- maps 'function' from interface