From f6232db745af1acd2473f51f82d006372c04fc55 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Wed, 20 Feb 2019 10:36:14 +0100
Subject: Add VERTCON grid name alternatives in database, and handle filename
 substitution for VERTCON method

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

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index a45c43f1..99f20d0e 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -142,6 +142,53 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'proj-datumgrid-europe',
                               NULL, NULL, NULL, NULL);
 
+-- Continental USA VERTCON: NGVD (19)29 height to NAVD (19)88 height
+
+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 ('vertconw.94',
+                              'vertconw.gtx',
+                              'GTX',
+                              'vgridshift',
+                              0,
+                              'proj-datumgrid-north-america',
+                              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 ('vertconc.94',
+                              'vertconc.gtx',
+                              'GTX',
+                              'vgridshift',
+                              0,
+                              'proj-datumgrid-north-america',
+                              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 ('vertcone.94',
+                              'vertcone.gtx',
+                              'GTX',
+                              'vgridshift',
+                              0,
+                              'proj-datumgrid-north-america',
+                              NULL, NULL, NULL, NULL);
+
 -- EGM models
 
 INSERT INTO grid_alternatives(original_grid_name,
-- 
cgit v1.2.3


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


From ed0636425083034b55633402108b85bc765ae0eb Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Mon, 25 Mar 2019 18:29:39 +0100
Subject: Database: add link from RAF18.tac to RAF18.gtx

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

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index 6d766b21..df82ddd3 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -464,6 +464,21 @@ INSERT INTO grid_alternatives(original_grid_name,
                               'proj-datumgrid-europe',
                               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 ('RAF18.tac',
+                              'RAF18.gtx',
+                              'GTX',
+                              'vgridshift',
+                              1,
+                              'proj-datumgrid-europe',
+                              NULL, NULL, NULL, NULL);
+
 INSERT INTO grid_alternatives(original_grid_name,
                               proj_grid_name,
                               proj_grid_format,
-- 
cgit v1.2.3


From d4ffaca08a4f2ef3475165c2634561ee9bf01885 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Mon, 6 May 2019 23:09:51 +0200
Subject: Database: register URLs for naptrans2008.gtx and rdtrans2008.gsb
 (non-free) grids

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

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

diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index df82ddd3..38560202 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -798,3 +798,41 @@ INSERT INTO grid_alternatives(original_grid_name,
                               0,
                               'proj-datumgrid-oceania',
                               NULL, NULL, NULL, NULL);
+
+-- Netherlands / RDNAP (non-free 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 ('naptrans2008.gtx',
+                              'naptrans2008.gtx',
+                              'GTX',
+                              'vgridshift',
+                              0,
+                              NULL, -- package name
+                              'https://salsa.debian.org/debian-gis-team/proj-rdnap/raw/upstream/2008/naptrans2008.gtx',
+                              1, -- direct download
+                              0, -- non-freely licensed. See https://salsa.debian.org/debian-gis-team/proj-rdnap/raw/master/debian/copyright
+                              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 ('rdtrans2008.gsb',
+                              'rdtrans2008.gsb',
+                              'NTv2',
+                              'hgridshift',
+                              0,
+                              NULL, -- package name
+                              'https://salsa.debian.org/debian-gis-team/proj-rdnap/raw/upstream/2008/rdtrans2008.gsb',
+                              1, -- direct download
+                              0, -- non-freely licensed. See https://salsa.debian.org/debian-gis-team/proj-rdnap/raw/master/debian/copyright
+                              NULL);
-- 
cgit v1.2.3


From 3476f934545d5a93ea1a9e77589927e82ac6170c Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Wed, 8 May 2019 18:04:15 +0200
Subject: Database: add bd72lb72_etrs89lb08.gsb grid in grid_alternatives
 (added in proj-datumgrid-europe package per
 https://github.com/OSGeo/proj-datumgrid/pull/50)

---
 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 38560202..cf1e559d 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -836,3 +836,20 @@ INSERT INTO grid_alternatives(original_grid_name,
                               1, -- direct download
                               0, -- non-freely licensed. See https://salsa.debian.org/debian-gis-team/proj-rdnap/raw/master/debian/copyright
                               NULL);
+
+-- Belgium
+
+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 ('bd72lb72_etrs89lb08.gsb',
+                              'bd72lb72_etrs89lb08.gsb',
+                              'NTv2',
+                              'hgridshift',
+                              0,
+                              'proj-datumgrid-europe',
+                              NULL, NULL, NULL, NULL);
-- 
cgit v1.2.3

