From a9ef3a229c6fef5ef8a05ba521a0237f2ffa6aa6 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Thu, 6 Dec 2018 16:23:07 +0100
Subject: Coordinate operation search: add a authority_to_authority_preference
 table to restrict and prioritize searches

---
 data/sql/customizations.sql | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'data/sql/customizations.sql')

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
-- 
cgit v1.2.3

