diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-30 11:33:59 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-30 12:57:03 +0200 |
| commit | da32ee9459cb08df87d5c02a83037158772d1047 (patch) | |
| tree | ceec9020c8e62af775168b62d2b89dd7c75f14e8 /data | |
| parent | 64946ab103d66508bf56bf80417bb5d69876bd25 (diff) | |
| download | PROJ-da32ee9459cb08df87d5c02a83037158772d1047.tar.gz PROJ-da32ee9459cb08df87d5c02a83037158772d1047.zip | |
Database: fix registration of custom entries of grid_transformation_custom.sql for geoid grids (fixes #2112)
Diffstat (limited to 'data')
| -rw-r--r-- | data/sql/commit.sql | 13 | ||||
| -rw-r--r-- | data/sql/grid_transformation_custom.sql | 56 |
2 files changed, 28 insertions, 41 deletions
diff --git a/data/sql/commit.sql b/data/sql/commit.sql index a3028586..d090ccb2 100644 --- a/data/sql/commit.sql +++ b/data/sql/commit.sql @@ -63,19 +63,6 @@ FOR EACH ROW BEGIN (SELECT auth_name || code FROM geodetic_crs WHERE type = 'geographic 2D')); - -- check that grids with HEIGHT_TO_GEOGRAPHIC3D method are properly registered - SELECT RAISE(ABORT, 'One grid_transformation with HEIGHT_TO_GEOGRAPHIC3D has not its source_crs in vertical_crs table') - WHERE EXISTS (SELECT * FROM grid_transformation g WHERE - g.method_code = 'HEIGHT_TO_GEOGRAPHIC3D' AND - g.source_crs_auth_name || g.source_crs_code NOT IN - (SELECT auth_name || code FROM vertical_crs)); - SELECT RAISE(ABORT, 'One grid_transformation with HEIGHT_TO_GEOGRAPHIC3D has not its target_crs in geodetic_crs table with type = ''geographic 3D''') - WHERE EXISTS (SELECT * FROM grid_transformation g WHERE - g.method_code = 'HEIGHT_TO_GEOGRAPHIC3D' AND - g.target_crs_auth_name || g.target_crs_code NOT IN - (SELECT auth_name || code FROM geodetic_crs - WHERE type = 'geographic 3D')); - -- check that grids with Geographic3D to GravityRelatedHeight method are properly registered SELECT RAISE(ABORT, 'One grid_transformation with Geographic3D to GravityRelatedHeight has not its target_crs in vertical_crs table') WHERE EXISTS (SELECT * FROM grid_transformation g WHERE 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', |
