diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-09-15 13:08:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-15 13:08:13 +0200 |
| commit | 6dcbdb941c0e1faef8f60a80c6c3aab483850bcb (patch) | |
| tree | d5f133c29a42a0e89ae6cd03b88f1da6d2521b2e /data/sql/proj_db_table_defs.sql | |
| parent | e6442e828282bdc6a398f1a699e54afe8fc82246 (diff) | |
| parent | e6eae43cf2310c77a466fee257d9974b14ee85fd (diff) | |
| download | PROJ-6dcbdb941c0e1faef8f60a80c6c3aab483850bcb.tar.gz PROJ-6dcbdb941c0e1faef8f60a80c6c3aab483850bcb.zip | |
Merge pull request #1608 from rouault/improve_transforms_fromto_wgs84_gXXXX_realizations
Improvements in transformations from/to WGS 84 (Gxxxx) realizations and vertical <--> geog transormations
Diffstat (limited to 'data/sql/proj_db_table_defs.sql')
| -rw-r--r-- | data/sql/proj_db_table_defs.sql | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data/sql/proj_db_table_defs.sql b/data/sql/proj_db_table_defs.sql index 255de827..6b38e736 100644 --- a/data/sql/proj_db_table_defs.sql +++ b/data/sql/proj_db_table_defs.sql @@ -126,6 +126,19 @@ FOR EACH ROW BEGIN WHERE EXISTS(SELECT 1 FROM area WHERE area.auth_name = NEW.area_of_use_auth_name AND area.code = NEW.area_of_use_code AND area.deprecated != 0) AND NEW.deprecated = 0; END; +-- indicates that if there is no transformation from/into (src_auth_name, src_code), +-- a research going through (hub_auth_name, hub_code) should be made +CREATE TABLE geodetic_datum_preferred_hub( + src_auth_name TEXT NOT NULL CHECK (length(src_auth_name) >= 1), + src_code TEXT NOT NULL CHECK (length(src_code) >= 1), + hub_auth_name TEXT NOT NULL CHECK (length(hub_auth_name) >= 1), + hub_code TEXT NOT NULL CHECK (length(hub_code) >= 1), + + CONSTRAINT unique_geodetic_datum_preferred_hub UNIQUE (src_auth_name, src_code, hub_auth_name, hub_code), + CONSTRAINT fk_geodetic_datum_preferred_hub_src FOREIGN KEY (src_auth_name, src_code) REFERENCES geodetic_datum(auth_name, code), + CONSTRAINT fk_geodetic_datum_preferred_hub_src FOREIGN KEY (hub_auth_name, hub_code) REFERENCES geodetic_datum(auth_name, code) +); + CREATE TABLE vertical_datum ( auth_name TEXT NOT NULL CHECK (length(auth_name) >= 1), code TEXT NOT NULL CHECK (length(code) >= 1), |
