From 2620701a4bb51a20d49e869acddce2167ba791d0 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Wed, 20 Feb 2019 22:16:13 +0100
Subject: proj.db: add custom entry for 'RH2000 height to SWEREF99'

---
 data/sql/grid_alternatives.sql | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index 99f20d0e..6cee2aca 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -286,6 +286,23 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'proj-datumgrid-europe',
                               NULL, NULL, NULL, NULL);
 
+-- Sweden height models
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('SWEN17_RH2000.gtx',
+                              'SWEN17_RH2000.gtx', -- no change. Just document the package
+                              'GTX',
+                              'vgridshift',
+                              0,         -- do not reverse here as grid_transformation_custom does reference from VerticalCRS height to Geographic height
+                              'proj-datumgrid-europe',
+                              NULL, NULL, NULL, NULL);
+
 ----------------------------
 -- US GEOID12B height models
 ----------------------------
-- 
cgit v1.2.3


From 6d6ee7fa7d35bf57d1781136102f971cb0ac33d2 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Thu, 21 Feb 2019 00:40:08 +0100
Subject: proj.db: add entries in grid_alternatives table for Oceania grids

---
 data/sql/grid_alternatives.sql | 71 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index 6cee2aca..dfeb1251 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -26,6 +26,12 @@ INSERT INTO grid_packages VALUES ('proj-datumgrid-europe',
                                   1,
                                   1);
 
+INSERT INTO grid_packages VALUES ('proj-datumgrid-oceania',
+                                  'Package with grids of interest for Oceania',
+                                  'https://download.osgeo.org/proj/proj-datumgrid-oceania-latest.zip',
+                                  1,
+                                  1);
+
  -- not released yet at the time of writing
 INSERT INTO grid_packages VALUES ('proj-datumgrid-world',
                                   'Package with grids of global extent (too large to be included in proj-datumgrid)',
@@ -661,3 +667,68 @@ INSERT INTO grid_alternatives(original_grid_name,
                             1,
                             'proj-datumgrid-europe',
                             NULL, NULL, NULL, NULL);
+
+
+----------------------------
+-- Australian grids
+----------------------------
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('A66 National (13.09.01).gsb',
+                              'A66_National_13_09_01.gsb',
+                              'NTv2',
+                              'hgridshift',
+                              0,
+                              'proj-datumgrid-oceania',
+                              NULL, NULL, NULL, NULL);
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('National 84 (02.07.01).gsb',
+                              'National_84_02_07_01.gsb',
+                              'NTv2',
+                              'hgridshift',
+                              0,
+                              'proj-datumgrid-oceania',
+                              NULL, NULL, NULL, NULL);
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('GDA94_GDA2020_conformal.gsb',
+                              'GDA94_GDA2020_conformal.gsb',
+                              'NTv2',
+                              'hgridshift',
+                              0,
+                              'proj-datumgrid-oceania',
+                              NULL, NULL, NULL, NULL);
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('GDA94_GDA2020_conformal_and_distortion.gsb',
+                              'GDA94_GDA2020_conformal_and_distortion.gsb',
+                              'NTv2',
+                              'hgridshift',
+                              0,
+                              'proj-datumgrid-oceania',
+                              NULL, NULL, NULL, NULL);
-- 
cgit v1.2.3


From 95ee9fabd268dde1a3c8b51e88bb7dc318e29de1 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Thu, 21 Feb 2019 11:35:12 +0100
Subject: proj.db: add custom entry for 'FVR09 height to ETRS89'

---
 data/sql/grid_alternatives.sql | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index dfeb1251..a287012c 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -292,6 +292,23 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'proj-datumgrid-europe',
                               NULL, NULL, NULL, NULL);
 
+-- Faroe islands height models
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('fvr09.gtx',
+                              'fvr09.gtx', -- no change. Just document the package
+                              'GTX',
+                              'vgridshift',
+                              0,         -- do not reverse here as grid_transformation_custom does reference from VerticalCRS height to Geographic height
+                              'proj-datumgrid-europe',
+                              NULL, NULL, NULL, NULL);
+
 -- Sweden height models
 
 INSERT INTO grid_alternatives(original_grid_name,
-- 
cgit v1.2.3


From efb97ab5be8b8313dbf275934a25fd57ec5bee33 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Thu, 21 Feb 2019 11:44:56 +0100
Subject: proj.db: add grid_alternative entries for OSGM15_Malin and
 OSGM15_Belfast

---
 data/sql/grid_alternatives.sql | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index a287012c..0b43f275 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -326,6 +326,40 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'proj-datumgrid-europe',
                               NULL, NULL, NULL, NULL);
 
+-- Ireland: OSGM15 height, Malin head datum -> ETRS89 ellipsoidal heights
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('OSGM15_Malin.gri',
+                              'OSGM15_Malin.gtx',
+                              'GTX',
+                              'vgridshift',
+                              1,
+                              'proj-datumgrid-europe',
+                              NULL, NULL, NULL, NULL);
+
+-- Northern Ireland: OSGM15 height, Belfast height -> ETRS89 ellipsoidal heights
+
+INSERT INTO grid_alternatives(original_grid_name,
+                              proj_grid_name,
+                              proj_grid_format,
+                              proj_method,
+                              inverse_direction,
+                              package_name,
+                              url, direct_download, open_license, directory)
+                      VALUES ('OSGM15_Belfast.gri',
+                              'OSGM15_Belfast.gtx',
+                              'GTX',
+                              'vgridshift',
+                              1,
+                              'proj-datumgrid-europe',
+                              NULL, NULL, NULL, NULL);
+
 ----------------------------
 -- US GEOID12B height models
 ----------------------------
-- 
cgit v1.2.3


From 2e23effff14c82abf086664341a4646d4b928239 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Thu, 21 Feb 2019 12:19:36 +0100
Subject: proj.db: fix direction of USA GEOID12B grid alternatives

---
 data/sql/grid_alternatives.sql | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index 0b43f275..6d766b21 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -376,7 +376,7 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'g2012bu0.gtx',
                               'GTX',
                               'vgridshift',
-                              0,
+                              1,
                               'proj-datumgrid-north-america',
                               NULL, NULL, NULL, NULL);
 
@@ -392,7 +392,7 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'g2012ba0.gtx',
                               'GTX',
                               'vgridshift',
-                              0,
+                              1,
                               'proj-datumgrid-north-america',
                               NULL, NULL, NULL, NULL);
 
@@ -408,7 +408,7 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'g2012bp0.gtx',
                               'GTX',
                               'vgridshift',
-                              0,
+                              1,
                               'proj-datumgrid-north-america',
                               NULL, NULL, NULL, NULL);
 
@@ -424,7 +424,7 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'g2012bg0.gtx',
                               'GTX',
                               'vgridshift',
-                              0,
+                              1,
                               'proj-datumgrid-north-america',
                               NULL, NULL, NULL, NULL);
 
@@ -440,7 +440,7 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'g2012bs0.gtx',
                               'GTX',
                               'vgridshift',
-                              0,
+                              1,
                               'proj-datumgrid-north-america',
                               NULL, NULL, NULL, NULL);
 
-- 
cgit v1.2.3

