Mercurial > gemma
changeset 934:e6220a19f284
Add categories of distance marks
This is in line with the IENC feature catalogue, which
distance_mark_function was not.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 08 Oct 2018 15:18:26 +0200 |
parents | ae1531e00344 |
children | 430d52c2f6ef |
files | schema/gemma.sql |
diffstat | 1 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/gemma.sql Mon Oct 08 14:52:37 2018 +0200 +++ b/schema/gemma.sql Mon Oct 08 15:18:26 2018 +0200 @@ -107,10 +107,12 @@ reference_water_level varchar(20) PRIMARY KEY ); -CREATE TABLE distance_mark_functions ( - -- XXX: Redundant information to object code in isrs code of dist. mark - distance_mark_function varchar(8) PRIMARY KEY +CREATE TABLE catdis ( + catdis smallint PRIMARY KEY + -- TODO: Do we need name and/or definition from IENC feature catalogue? + -- (see page 171 of edition 2.3) ); +INSERT INTO catdis VALUES (1), (2), (3), (4); CREATE TABLE position_codes ( position_code char(2) PRIMARY KEY @@ -287,10 +289,7 @@ CREATE TABLE distance_marks ( location_code isrs PRIMARY KEY, geom geography(POINT, 4326) NOT NULL, - distance_mark_function varchar(8) - NOT NULL REFERENCES distance_mark_functions, - -- XXX: attribute "function" in DRC 2.1.7 as well as CATDIS seem - -- to encode the same thing as the object code in ISRS location code. + catdis smallint NOT NULL REFERENCES catdis, position_code char(2) NOT NULL REFERENCES position_codes ) @@ -300,7 +299,7 @@ CREATE VIEW waterway.distance_marks_geoserver AS SELECT location_code::VARCHAR, geom::Geometry(POINT, 4326), - distance_mark_function, + catdis, position_code, (location_code).hectometre FROM waterway.distance_marks