comparison backend/doc/schema/postgresql-sinfo-uinfo.sql @ 9661:9b8ba3b83a15

Importer (s/u-info) vegetation zones: new database column in vegetation_type table for german type name, localized vegetation type names by querying the database instead of translating by resource property, detecting and cancelling the import of a second vegetation zone file for a river, detecting, logging, cancelling in case of wrong column titles, detecting, logging and ignoring lines with missing (color) values, comparing vegetation zone name and class with the database and logging+ignoring in case of inconsistencies, starting the most elevated zone with 0 instead of -1 overflow days
author mschaefer
date Mon, 23 Mar 2020 16:38:12 +0100
parents d889ffe2fb05
children
comparison
equal deleted inserted replaced
9660:f0cad5212f49 9661:9b8ba3b83a15
423 423
424 --Vegetation zone 424 --Vegetation zone
425 425
426 CREATE TABLE vegetation_type ( 426 CREATE TABLE vegetation_type (
427 id NUMERIC(9,0) PRIMARY KEY, 427 id NUMERIC(9,0) PRIMARY KEY,
428 name VARCHAR(256) NOT NULL 428 name VARCHAR(256) NOT NULL,
429 ); 429 de_name VARCHAR(256) NOT NULL
430 INSERT INTO vegetation_type (id, name) VALUES (1, 'zonal forest'); 430 );
431 INSERT INTO vegetation_type (id, name) VALUES (2, 'dry hartwood forest floodplain'); 431 INSERT INTO vegetation_type (id, name, de_name) VALUES (1, 'zonal forest', 'Zonaler Wald');
432 INSERT INTO vegetation_type (id, name) VALUES (3, 'wet hartwood forest floodplain'); 432 INSERT INTO vegetation_type (id, name, de_name) VALUES (2, 'dry hartwood forest floodplain', 'Hartholzaue, trocken');
433 INSERT INTO vegetation_type (id, name) VALUES (4, 'salix alba forest'); 433 INSERT INTO vegetation_type (id, name, de_name) VALUES (3, 'wet hartwood forest floodplain', 'Hartholzaue, feucht');
434 INSERT INTO vegetation_type (id, name) VALUES (5, 'salix shrubs'); 434 INSERT INTO vegetation_type (id, name, de_name) VALUES (4, 'salix alba forest', 'Silberweidenwald');
435 INSERT INTO vegetation_type (id, name) VALUES (6, 'reed bed'); 435 INSERT INTO vegetation_type (id, name, de_name) VALUES (5, 'salix shrubs', 'Weidengebüsch');
436 INSERT INTO vegetation_type (id, name) VALUES (7, 'bank pioneers'); 436 INSERT INTO vegetation_type (id, name, de_name) VALUES (6, 'reed bed', 'Uferröhricht');
437 INSERT INTO vegetation_type (id, name) VALUES (8, 'no vegetation'); 437 INSERT INTO vegetation_type (id, name, de_name) VALUES (7, 'bank pioneers', 'Uferpioniere');
438 INSERT INTO vegetation_type (id, name) VALUES (9, 'water'); 438 INSERT INTO vegetation_type (id, name, de_name) VALUES (8, 'no vegetation', 'vegetationslos');
439 INSERT INTO vegetation_type (id, name, de_name) VALUES (9, 'water', 'Wasserfläche');
439 440
440 441
441 CREATE TABLE vegetation ( 442 CREATE TABLE vegetation (
442 id NUMERIC(9,0) PRIMARY KEY, 443 id NUMERIC(9,0) PRIMARY KEY,
443 river_id integer NOT NULL CONSTRAINT cVegetationRivers REFERENCES rivers(id) ON DELETE CASCADE, 444 river_id integer NOT NULL CONSTRAINT cVegetationRivers REFERENCES rivers(id) ON DELETE CASCADE,

http://dive4elements.wald.intevation.org