From b8f8a708c2299ba55b3d4754aa75633e3ee5897b Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Wed, 25 Dec 2019 16:23:31 +0100
Subject: Database: tune accuracy of Canadian NTv1 file w.r.t NTv2

As on import of EPSG, we remove the supersession of Canadian NTv1 file w.r.t NTv2
(because the default behaviour of PROJ is to ignore superseded operations). However
the NTv1 operation is advertized with an accuracy of 1m, whereas NTv2 is advertized
with 1.5m. Consequently on areas where both files are valid, and if both files are
available, NTv1 would be selected. So as a workaround, worsen the NTv1 accuracy to
2m so that NTv2 is used in priority.
---
 data/sql/customizations.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)

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

diff --git a/data/sql/customizations.sql b/data/sql/customizations.sql
index 8003c921..86d49b09 100644
--- a/data/sql/customizations.sql
+++ b/data/sql/customizations.sql
@@ -26,6 +26,17 @@ UPDATE grid_transformation SET interpolation_crs_auth_name = 'EPSG',
                                interpolation_crs_code = '4289'
                            WHERE auth_name = 'EPSG' AND code = '7001';
 
+-- EPSG:1312 'NAD27 to NAD83 (3)' / NTv1_0.gsb has a accuracy of 1m whereas
+-- EPSG:1313 'NAD27 to NAD83 (4)' / NTv2_0.gsb has a accuracy of 1.5m
+-- so we will never select automatically NTv2_0.gsb. Worse the advertize
+-- accuracy of the NTv1 method
+
+UPDATE grid_transformation SET accuracy = 2.0 WHERE auth_name = 'EPSG' AND code = '1312';
+
+-- Same for EPSG:1462 vs EPSG:1573
+
+UPDATE grid_transformation SET accuracy = 2.0 WHERE auth_name = 'EPSG' AND code = '1462';
+
 -- Define the allowed authorities, and their precedence, when researching a
 -- coordinate operation
 
-- 
cgit v1.2.3

