diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-05-07 11:39:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-07 11:39:48 +0200 |
| commit | 850050693a25843d6ae69492cfad72f7753e39f7 (patch) | |
| tree | 4d464df04190ae115e7f54259457286d22580eb9 /data | |
| parent | 4636df33ed4d2a9bedf19973d58a42858fb816c0 (diff) | |
| parent | d4ffaca08a4f2ef3475165c2634561ee9bf01885 (diff) | |
| download | PROJ-850050693a25843d6ae69492cfad72f7753e39f7.tar.gz PROJ-850050693a25843d6ae69492cfad72f7753e39f7.zip | |
Merge pull request #1454 from rouault/fix_ETRS89_3D_to_proj_string_with_geoidgrids_nadgrids
createOperations(): fix case of ETRS89 3D to proj string with nadgrids and geoidgrids
Diffstat (limited to 'data')
| -rw-r--r-- | data/Makefile.am | 4 | ||||
| -rw-r--r-- | data/sql/customizations.sql | 19 | ||||
| -rw-r--r-- | data/sql/grid_alternatives.sql | 38 |
3 files changed, 59 insertions, 2 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index a4446287..1bf95cd2 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -64,7 +64,7 @@ proj.db: $(DATAPATH)/sql/*.sql for x in $(SQL_ORDERED_LIST); do \ export SQL_EXPANDED_LIST="$${SQL_EXPANDED_LIST} $(DATAPATH)/$$x"; \ done; \ - if test "x$(PROJ_DB_CACHE_DIR)" != "x" -a -f "$(PROJ_DB_CACHE_DIR)/proj.db" -a -f "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5" ; then \ + if test "x$(PROJ_DB_CACHE_DIR)" != "x" -a -x "$$(command -v md5sum)" -a -f "$(PROJ_DB_CACHE_DIR)/proj.db" -a -f "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5" ; then \ cat $${SQL_EXPANDED_LIST} | md5sum | diff - "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5" > /dev/null \ && (echo "Reusing cached proj.db"; cp "$(PROJ_DB_CACHE_DIR)/proj.db" proj.db); \ fi; \ @@ -84,7 +84,7 @@ proj.db: $(DATAPATH)/sql/*.sql $(RM) proj.db; \ exit 1; \ else \ - if test "x$(PROJ_DB_CACHE_DIR)" != "x" ; then \ + if test "x$(PROJ_DB_CACHE_DIR)" != "x" -a -x "$$(command -v md5sum)" ; then \ mkdir -p "$(PROJ_DB_CACHE_DIR)"; \ cat $${SQL_EXPANDED_LIST} | md5sum > "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5"; \ cp proj.db "$(PROJ_DB_CACHE_DIR)"; \ diff --git a/data/sql/customizations.sql b/data/sql/customizations.sql index ee023700..0ce4a692 100644 --- a/data/sql/customizations.sql +++ b/data/sql/customizations.sql @@ -19,6 +19,25 @@ DELETE FROM "supersession" WHERE superseded_table_name = 'grid_transformation' A replacement_code = '8885' AND source = 'EPSG'; +-- ('EPSG','7001','ETRS89 to NAP height (1)') lacks an interpolationCRS with Amersfoort / EPSG:4289 +-- See https://salsa.debian.org/debian-gis-team/proj-rdnap/blob/debian/2008-8/Use%20of%20RDTRANS2008%20and%20NAPTRANS2008.pdf +-- "The naptrans2008 VDatum-grid is referenced to the Bessel-1841 ellipsoid" +CREATE TABLE dummy(foo); +CREATE TRIGGER check_grid_transformation_epsg_7001 +BEFORE INSERT ON dummy +FOR EACH ROW BEGIN + SELECT RAISE(ABORT, 'grid_transformation EPSG:7001 entry is not ETRS89 to NAP height (1)') + WHERE NOT EXISTS(SELECT 1 FROM grid_transformation WHERE auth_name = 'EPSG' AND code = '7001' AND name = 'ETRS89 to NAP height (1)'); + SELECT RAISE(ABORT, 'grid_transformation EPSG:7001 entry has already an interpolationCRS') + WHERE EXISTS(SELECT 1 FROM grid_transformation WHERE auth_name = 'EPSG' AND code = '7001' AND interpolation_crs_auth_name IS NOT NULL); +END; +INSERT INTO dummy DEFAULT VALUES; +DROP TRIGGER check_grid_transformation_epsg_7001; +DROP TABLE dummy; +UPDATE grid_transformation SET interpolation_crs_auth_name = 'EPSG', + interpolation_crs_code = '4289' + WHERE auth_name = 'EPSG' AND code = '7001'; + -- Define the allowed authorities, and their precedence, when researching a -- coordinate operation 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); |
