From da32ee9459cb08df87d5c02a83037158772d1047 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Mon, 30 Mar 2020 11:33:59 +0200
Subject: Database: fix registration of custom entries of
 grid_transformation_custom.sql for geoid grids (fixes #2112)

---
 data/sql/grid_transformation_custom.sql | 56 ++++++++++++++++-----------------
 1 file changed, 28 insertions(+), 28 deletions(-)

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

diff --git a/data/sql/grid_transformation_custom.sql b/data/sql/grid_transformation_custom.sql
index 97d36171..2de21f64 100644
--- a/data/sql/grid_transformation_custom.sql
+++ b/data/sql/grid_transformation_custom.sql
@@ -3,22 +3,22 @@
 -- Denmark
 
 INSERT INTO "grid_transformation" VALUES(
-    'PROJ','EPSG_5799_TO_EPSG_4937','DVR90 height to ETRS89',
+    'PROJ','EPSG_4937_TO_EPSG_5799','ETRS89 to DVR90 height',
     NULL,NULL,
-    'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
-    'EPSG','5799', -- source CRS (DVR90 height)
-    'EPSG','4937', -- target CRS (ETRS89)
+    'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
+    'EPSG','4937', -- source CRS (ETRS89)
+    'EPSG','5799', -- target CRS (DVR90 height)
     'EPSG','3237', -- area of use: Denmark onshore
     NULL,
     'EPSG','8666','Geoid (height correction) model file','dvr90.gtx',
     NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
 
 INSERT INTO "grid_transformation" VALUES(
-    'PROJ','EPSG_5733_TO_EPSG_4937','DNN height to ETRS89',
+    'PROJ','EPSG_4937_TO_EPSG_5733','ETRS89 to DNN height',
     NULL,NULL,
-    'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
-    'EPSG','5733', -- source CRS (DNN height)
-    'EPSG','4937', -- target CRS (ETRS89)
+    'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
+    'EPSG','4937', -- source CRS (ETRS89)
+    'EPSG','5733', -- target CRS (DNN height)
     'EPSG','3237', -- area of use: Denmark onshore
     NULL,
     'EPSG','8666','Geoid (height correction) model file','dnn.gtx',
@@ -27,11 +27,11 @@ INSERT INTO "grid_transformation" VALUES(
 -- Faroe Islands
 
 INSERT INTO "grid_transformation" VALUES(
-    'PROJ','EPSG_5317_TO_EPSG_4937','FVR09 height to ETRS89',
+    'PROJ','EPSG_4937_TO_EPSG_5317','ETRS89 to FVR09 height',
     NULL,NULL,
-    'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
-    'EPSG','5317', -- source CRS (FVR09 height)
-    'EPSG','4937', -- target CRS (ETRS89)
+    'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
+    'EPSG','4937', -- source CRS (ETRS89)
+    'EPSG','5317', -- target CRS (FVR09 height)
     'EPSG','3248', -- area of use: Faroe Islands - onshore
     NULL,
     'EPSG','8666','Geoid (height correction) model file','fvr09.gtx',
@@ -40,11 +40,11 @@ INSERT INTO "grid_transformation" VALUES(
 -- Sweden
 
 INSERT INTO "grid_transformation" VALUES(
-    'PROJ','EPSG_5613_TO_EPSG_4977','RH2000 height to SWEREF99',
+    'PROJ','EPSG_4977_TO_EPSG_5613','SWEREF99 to RH2000 height',
     NULL,NULL,
-    'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
-    'EPSG','5613', -- source CRS (RH2000 height)
-    'EPSG','4977', -- target CRS (SWEREF99)
+    'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
+    'EPSG','4977', -- source CRS (SWEREF99)
+    'EPSG','5613', -- target CRS (RH2000 height)
     'EPSG','3313', -- area of use: Sweden onshore
     NULL,
     'EPSG','8666','Geoid (height correction) model file','SWEN17_RH2000.gtx',
@@ -59,33 +59,33 @@ INSERT INTO "grid_transformation" VALUES('PROJ','SETA2016','DHDN to ETRS89 (SETA
 -- Iceland
 
 INSERT INTO "grid_transformation" VALUES(
-    'PROJ','EPSG_8089_TO_EPSG_5323','ISH2004 height to ISN2004',
+    'PROJ','EPSG_5323_TO_EPSG_8089','ISN2004 to ISH2004 height',
     NULL,NULL,
-    'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
-    'EPSG','8089', -- source CRS (ISH2004 height)
-    'EPSG','5323', -- target CRS (ISN2004 geographic 3D)
+    'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
+    'EPSG','5323', -- source CRS (ISN2004 geographic 3D)
+    'EPSG','8089', -- target CRS (ISH2004 height)
     'EPSG','1120', -- area of use: Iceland - onshore and offshore
     NULL,
     'EPSG','8666','Geoid (height correction) model file','Icegeoid_ISN2004.gtx',
     NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
     
 INSERT INTO "grid_transformation" VALUES(
-    'PROJ','EPSG_8089_TO_EPSG_4945','ISH2004 height to ISN93',
+    'PROJ','EPSG_4945_TO_EPSG_8089','ISN93 to ISH2004 height',
     NULL,NULL,
-    'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
-    'EPSG','8089', -- source CRS (ISH2004 height)
-    'EPSG','4945', -- target CRS (ISN93 geographic 3D)
+    'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
+    'EPSG','4945', -- source CRS (ISN93 geographic 3D)
+    'EPSG','8089', -- target CRS (ISH2004 height)
     'EPSG','1120', -- area of use: Iceland - onshore and offshore
     NULL,
     'EPSG','8666','Geoid (height correction) model file','Icegeoid_ISN93.gtx',
     NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
     
 INSERT INTO "grid_transformation" VALUES(
-    'PROJ','EPSG_8089_TO_EPSG_8085','ISH2004 height to ISN2016',
+    'PROJ','EPSG_8085_TO_EPSG_8089','ISN2016 to ISH2004 height',
     NULL,NULL,
-    'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
-    'EPSG','8089', -- source CRS (ISH2004 height)
-    'EPSG','8085', -- target CRS (ISN2016 geographic 3D)
+    'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
+    'EPSG','8085', -- source CRS (ISN2016 geographic 3D)
+    'EPSG','8089', -- target CRS (ISH2004 height)
     'EPSG','1120', -- area of use: Iceland - onshore and offshore
     NULL,
     'EPSG','8666','Geoid (height correction) model file','Icegeoid_ISN2016.gtx',
-- 
cgit v1.2.3

