aboutsummaryrefslogtreecommitdiff
path: root/data/sql
diff options
context:
space:
mode:
Diffstat (limited to 'data/sql')
-rw-r--r--data/sql/customizations.sql18
-rw-r--r--data/sql/proj_db_table_defs.sql9
2 files changed, 27 insertions, 0 deletions
diff --git a/data/sql/customizations.sql b/data/sql/customizations.sql
index 2181cc2b..8e31c233 100644
--- a/data/sql/customizations.sql
+++ b/data/sql/customizations.sql
@@ -6,3 +6,21 @@ INSERT INTO "other_transformation" VALUES('PROJ','CRS84_TO_EPSG_4326','OGC:CRS84
-- alias of EPSG:3857
INSERT INTO "projected_crs" VALUES('EPSG','900913','Google Maps Global Mercator',NULL,NULL,'EPSG','4499','EPSG','4326','EPSG','3856','EPSG','3544',NULL,1);
+
+-- Define the allowed authorities, and their precedence, when researching a
+-- coordinate operation
+
+INSERT INTO authority_to_authority_preference(source_auth_name, target_auth_name, allowed_authorities) VALUES
+ ('any', 'EPSG', 'PROJ,EPSG,any' );
+
+INSERT INTO authority_to_authority_preference(source_auth_name, target_auth_name, allowed_authorities) VALUES
+ ('EPSG', 'EPSG', 'PROJ,EPSG' );
+
+INSERT INTO authority_to_authority_preference(source_auth_name, target_auth_name, allowed_authorities) VALUES
+ ('PROJ', 'EPSG', 'PROJ,EPSG' );
+
+INSERT INTO authority_to_authority_preference(source_auth_name, target_auth_name, allowed_authorities) VALUES
+ ('IGNF', 'EPSG', 'PROJ,IGNF,EPSG' );
+
+INSERT INTO authority_to_authority_preference(source_auth_name, target_auth_name, allowed_authorities) VALUES
+ ('ESRI', 'EPSG', 'PROJ,ESRI,EPSG' ); \ No newline at end of file
diff --git a/data/sql/proj_db_table_defs.sql b/data/sql/proj_db_table_defs.sql
index 553dab38..c63637cf 100644
--- a/data/sql/proj_db_table_defs.sql
+++ b/data/sql/proj_db_table_defs.sql
@@ -1048,3 +1048,12 @@ CREATE VIEW authority_list AS
UNION
SELECT DISTINCT auth_name FROM coordinate_operation_view
;
+
+-- Define the allowed authorities, and their precedence, when researching a
+-- coordinate operation
+CREATE TABLE authority_to_authority_preference(
+ source_auth_name TEXT NOT NULL, -- 'any' for any source
+ target_auth_name TEXT NOT NULL, -- 'any' for any target
+ allowed_authorities TEXT NOT NULL, -- for example 'PROJ,EPSG,any'
+ CONSTRAINT unique_authority_to_authority_preference UNIQUE (source_auth_name, target_auth_name)
+);