aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-11-30 19:41:50 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-12-02 15:57:40 +0100
commitdc55b17d0c7ae180bb73add3581fac7e8f959c11 (patch)
treebcdf64378044d02480c7fad70bd4dfef9470a1a0 /data
parent89bfd5d12e06685be8206d5f5d88d77846bb10e2 (diff)
downloadPROJ-dc55b17d0c7ae180bb73add3581fac7e8f959c11.tar.gz
PROJ-dc55b17d0c7ae180bb73add3581fac7e8f959c11.zip
Database: register the BWTA2017.gsb grid (DHDN->ETRS89 for Baden-Wurtemberg)
Relates to https://github.com/OSGeo/proj-datumgrid/pull/65 , https://github.com/OSGeo/proj-datumgrid/issues/22 As EPSG has no entry for it, we create a grid_transformation, as well as a dedicated area of use based on the extent of the grid, under the PROJ authority. With the hope to be able to remove it once EPSG has an entry...
Diffstat (limited to 'data')
-rw-r--r--data/sql/commit.sql6
-rw-r--r--data/sql/grid_alternatives.sql15
-rw-r--r--data/sql/grid_transformation_custom.sql6
3 files changed, 27 insertions, 0 deletions
diff --git a/data/sql/commit.sql b/data/sql/commit.sql
index a708df0f..0468032d 100644
--- a/data/sql/commit.sql
+++ b/data/sql/commit.sql
@@ -30,6 +30,12 @@ FOR EACH ROW BEGIN
SELECT RAISE(ABORT, 'corrupt definition of authority_list')
WHERE (SELECT 1 FROM authority_list LIMIT 1) = 0;
+ -- test to check that our custom grid transformation overrides are really needed
+ SELECT RAISE(ABORT, 'PROJ grid_transformation defined whereas EPSG has one')
+ WHERE EXISTS (SELECT 1 FROM grid_transformation g1, grid_transformation g2 WHERE
+ lower(g1.grid_name) = lower(g2.grid_name) AND
+ g1.auth_name = 'PROJ' AND g2.auth_name = 'EPSG');
+
-- check geoid_model table
SELECT RAISE(ABORT, 'missing GEOID99 in geoid_model')
WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID99');
diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index 20551581..647f14e6 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -125,6 +125,21 @@ INSERT INTO grid_alternatives(original_grid_name,
inverse_direction,
package_name,
url, direct_download, open_license, directory)
+ VALUES ('BWTA2017.gsb',
+ 'BWTA2017.gsb', -- no change. Just document the package
+ 'NTv2',
+ 'hgridshift',
+ 0,
+ '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 ('nzgd2kgrid0005.gsb',
'nzgd2kgrid0005.gsb', -- no change. Just document the package
'NTv2',
diff --git a/data/sql/grid_transformation_custom.sql b/data/sql/grid_transformation_custom.sql
index c269983e..c7a58836 100644
--- a/data/sql/grid_transformation_custom.sql
+++ b/data/sql/grid_transformation_custom.sql
@@ -49,3 +49,9 @@ INSERT INTO "grid_transformation" VALUES(
NULL,
'EPSG','8666','Geoid (height correction) model file','SWEN17_RH2000.gtx',
NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
+
+----- Hopefully temporary entry for BWTA2017.gsb grid -----
+
+INSERT INTO "area" VALUES('PROJ','BWTA2017','Germany - Baden-Wurtemberg','Germany - Baden-Wurtemberg',47.5,49.83,7.49,10.51,0);
+-- Advertize a 0.8 accuracy slightly better than the 0.9 of BETA2007 for sort purposes
+INSERT INTO "grid_transformation" VALUES('PROJ','BWTA2017','DHDN to ETRS89 (BWTA2017)','DHDN to ETRS89 for Baden-Wurtemberg for ALKIS 2017. Using official BWTA2017 grid but this transformation entry has been created temporarily by PROJ. Accuracy indication not to be considered as authoritative','For applications requiring an accuracy of better than 1 metre.','EPSG','9615','NTv2','EPSG','4314','EPSG','4258','PROJ','BWTA2017',0.89,'EPSG','8656','Latitude and longitude difference file','BWTA2017.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'-',0);