Mercurial > gemma
view schema/tap_tests_data.sql @ 948:5f89868bd75e
Store virtual and physical distance marks separately
Virtual distance marks on waterway axis always have an ISRS location
code, which is their natural primary key, but which other distance
marks do not (always) have. catdis and position_code are constant
for distance marks on fairway axis and do not need to be stored.
Btw. add a previously missing field for the name of the ENC the
information is based on.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Sat, 13 Oct 2018 14:26:40 +0200 |
parents | e78bdbb6cac8 |
children | 6590208e3ee1 |
line wrap: on
line source
-- -- Test data used in *_tests.sql scripts -- INSERT INTO countries VALUES ('AT'), ('RO'); INSERT INTO users.responsibility_areas VALUES ('AT', ST_geomfromtext('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326)), ('RO', ST_geomfromtext('MULTIPOLYGON(((1 0, 1 1, 2 1, 2 0, 1 0)))', 4326)); INSERT INTO users.list_users VALUES ( 'waterway_user', 'test_user_at', 'user_at1$', 'AT', NULL, 'xxx'); INSERT INTO users.list_users VALUES ( 'waterway_user', 'test_user_ro', 'user_ro1$', 'RO', NULL, 'xxy'); INSERT INTO users.list_users VALUES ( 'waterway_admin', 'test_admin_at', 'admin_at1$', 'AT', NULL, 'yyy'); INSERT INTO users.list_users VALUES ( 'sys_admin', 'test_sys_admin1', 'sys_admin1$', 'AT', NULL, 'zzz'); INSERT INTO limiting_factors VALUES ('depth'), ('width'); INSERT INTO waterway.gauges ( location, objname, geom, zero_point, source_organization) VALUES ( ('AT', 'XXX', '00001', 'G0001', 1)::isrs, 'testgauge', ST_geomfromtext('POINT(0 0)', 4326), 0, 'testorganization' ); INSERT INTO waterway.bottlenecks ( bottleneck_id, fk_g_fid, stretch, area, rb, lb, responsible_country, revisiting_time, limiting, source_organization, staging_done) VALUES ( 'testbottleneck1', ('AT', 'XXX', '00001', 'G0001', 1)::isrs, isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, ('AT', 'XXX', '00001', '00000', 2)::isrs), ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 'AT', 'AT', 'AT', 1, 'depth', 'testorganization', false ), ( 'testbottleneck2', ('AT', 'XXX', '00001', 'G0001', 1)::isrs, isrsrange(('AT', 'XXX', '00001', '00000', 0)::isrs, ('AT', 'XXX', '00001', '00000', 2)::isrs), ST_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 'AT', 'AT', 'AT', 1, 'depth', 'testorganization', true ); INSERT INTO users.templates (template_name, template_data) VALUES ('AT', '\x'), ('RO', '\x'); INSERT INTO users.user_templates VALUES ('test_user_at', 'AT'), ('test_user_ro', 'RO');