aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2021-03-23 21:06:52 +0100
committerGitHub <noreply@github.com>2021-03-23 21:06:52 +0100
commit03b5f40edf0fe5716f8ff72ae7db992b1786990b (patch)
treec38d1a29f665915b6e437695e3628ddcb1cef478 /data
parent9a7ee56058d1d01a35acc37b622430601401aa3f (diff)
parenteeb9fef28aed4f7e5d62d8c5064f96e1090ee348 (diff)
downloadPROJ-03b5f40edf0fe5716f8ff72ae7db992b1786990b.tar.gz
PROJ-03b5f40edf0fe5716f8ff72ae7db992b1786990b.zip
Merge pull request #2600 from rouault/backport_2548
[Backport 8.0] Database: Additions to the norwegian NKG2020 transformation (#2548), …
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am3
-rw-r--r--data/sql/grid_alternatives.sql6
-rw-r--r--data/sql/nkg.sql191
-rw-r--r--data/sql/nkg_post_customizations.sql13
-rw-r--r--data/sql/other_transformation_custom.sql16
-rw-r--r--data/sql/proj_db_table_defs.sql4
-rw-r--r--data/sql_filelist.cmake3
7 files changed, 219 insertions, 17 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 8f65ed5c..b9073bfc 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -39,10 +39,11 @@ SQL_ORDERED_LIST = sql/begin.sql \
sql/deprecation.sql \
sql/esri.sql \
sql/ignf.sql \
+ sql/nkg.sql \
sql/grid_alternatives.sql \
sql/grid_alternatives_generated_noaa.sql \
sql/customizations.sql \
- sql/nkg.sql \
+ sql/nkg_post_customizations.sql \
sql/commit.sql
EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \
diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index 35c92414..26630f04 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -116,6 +116,10 @@ VALUES
('EGM08_REDNAP.txt','es_ign_egm08-rednap.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/es_ign_egm08-rednap.tif',1,1,NULL),
('EGM08_REDNAP_Canarias.txt','es_ign_egm08-rednap-canarias.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/es_ign_egm08-rednap-canarias.tif',1,1,NULL),
+-- eur_nkg - Nordic Geodetic Commission
+('eur_nkg_nkgrf03vel_realigned.tif','eur_nkg_nkgrf03vel_realigned.tif',NULL,'GTiff','velocity_grid',0,NULL,'https://cdn.proj.org/eur_nkg_nkgrf03vel_realigned.tif',1,1,NULL),
+('eur_nkg_nkgrf17vel.tif','eur_nkg_nkgrf17vel.tif',NULL,'GTiff','velocity_grid',0,NULL,'https://cdn.proj.org/eur_nkg_nkgrf17vel.tif',1,1,NULL),
+
-- fi_nls - National Land Survey of Finland (MML)
('fi_nls_n43_n60.json','fi_nls_n43_n60.json',NULL,'JSON','tinshift',0,NULL,'https://cdn.proj.org/fi_nls_n43_n60.json',1,1,NULL),
('fi_nls_n60_n2000.json','fi_nls_n60_n2000.json',NULL,'JSON','tinshift',0,NULL,'https://cdn.proj.org/fi_nls_n60_n2000.json',1,1,NULL),
@@ -184,6 +188,8 @@ VALUES
-- Norwegian grids
('HREF2018B_NN2000_EUREF89.gtx','no_kv_HREF2018B_NN2000_EUREF89.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/no_kv_HREF2018B_NN2000_EUREF89.tif',1,1,NULL),
('href2008a.gtx','no_kv_href2008a.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/no_kv_href2008a.tif',1,1,NULL),
+('no_kv_NKGETRF14_EPSG7922_2000.tif','no_kv_NKGETRF14_EPSG7922_2000.tif',NULL,'GTiff','geocentricoffset',0,NULL,'https://cdn.proj.org/no_kv_NKGETRF14_EPSG7922_2000.tif',1,1,NULL),
+('no_kv_ETRS89NO_NGO48_TIN.json','no_kv_ETRS89NO_NGO48_TIN.json',NULL,'JSON','tinshift',0,NULL,'https://cdn.proj.org/no_kv_ETRS89NO_NGO48_TIN.json',1,1,NULL),
-- nz_linz - New Zealand
('nzgd2kgrid0005.gsb','nz_linz_nzgd2kgrid0005.tif','nzgd2kgrid0005.gsb','GTiff','hgridshift',0,NULL,'https://cdn.proj.org/nz_linz_nzgd2kgrid0005.tif',1,1,NULL),
diff --git a/data/sql/nkg.sql b/data/sql/nkg.sql
index 0c28d11d..14331e9a 100644
--- a/data/sql/nkg.sql
+++ b/data/sql/nkg.sql
@@ -2,19 +2,6 @@ INSERT INTO "metadata" VALUES('NKG.SOURCE', 'https://github.com/NordicGeodesy/No
INSERT INTO "metadata" VALUES('NKG.VERSION', '1.0.0');
INSERT INTO "metadata" VALUES('NKG.DATE', '2020-12-21');
--- Append NKG to authority references
-UPDATE
- authority_to_authority_preference
-SET
- allowed_authorities = allowed_authorities || ',NKG'
-WHERE
- source_auth_name = 'EPSG' AND target_auth_name = 'EPSG';
-
-INSERT INTO "authority_to_authority_preference"
- (source_auth_name,target_auth_name, allowed_authorities)
-VALUES
- ('NKG', 'EPSG', 'NKG,PROJ,EPSG');
-
-- extent for NKG2008 transformations
INSERT INTO "extent" VALUES(
'NKG','EXTENT_2008', -- extend auth+code
@@ -693,7 +680,75 @@ INSERT INTO "usage" VALUES (
'NKG', 'SCOPE_GENERIC' -- scope
);
+-- NO
+INSERT INTO "helmert_transformation" VALUES (
+ 'NKG','PAR_2020_NO', -- operation auth+code
+ 'NKG_ETRF14 to ETRF93@2000.0', -- name
+ 'Transformation from NKG_ETRF14 to ETRF93, at transformation reference epoch 2000.0', -- description / remark
+ 'EPSG','1033', -- method auth+code
+ 'Position Vector transformation (geocentric domain)',
+ 'NKG','ETRF14', -- source auth+code
+ 'EPSG','7922', -- target auth+code
+ 0.01, -- accuracy
+ -0.05172, -- x
+ 0.13747, -- y
+ -0.01648, -- z
+ 'EPSG','9001',
+ 0.00268452, -- rx
+ 0.00329165, -- ry
+ -0.00116569, -- rz
+ 'EPSG','9104',
+ 0.002583, -- s
+ 'EPSG','9202',
+ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
+ 'NKG 2020', -- operation version
+ 0
+);
+INSERT INTO "usage" VALUES (
+ 'NKG', '5041', -- usage auth+code
+ 'helmert_transformation', -- object_table_name
+ 'NKG','PAR_2020_NO', -- object auth+code
+ 'EPSG', '1352', -- extent: Norway - onshore
+ 'NKG', 'SCOPE_GENERIC' -- scope
+);
+
+INSERT INTO "other_transformation" (
+ auth_name,
+ code,
+ name,
+ description,
+ method_auth_name,
+ method_code,
+ method_name,
+ source_crs_auth_name,
+ source_crs_code,
+ target_crs_auth_name,
+ target_crs_code,
+ accuracy,
+ operation_version,
+ deprecated
+)
+VALUES(
+ 'NKG', 'NKG_ETRF14_ETRF93_2000', -- object auth+code
+ 'NKG_ETRF14 to ETRF93@2000.0', -- name
+ 'Transformation from NKG_ETRF14 to ETRF93, at transformation reference epoch 2000.0', -- description / remark
+ 'PROJ', 'PROJString',
+ '+proj=xyzgridshift +grids=no_kv_NKGETRF14_EPSG7922_2000.tif',
+ 'NKG','ETRF14', -- source auth+code
+ 'EPSG','7922', -- target auth+code
+ 0.005, -- accuracy
+ 'NKG 2020', -- operation_version
+ 0 -- deprecated
+);
+
+INSERT INTO "usage" VALUES (
+ 'NKG', '5064',
+ 'other_transformation',
+ 'NKG', 'NKG_ETRF14_ETRF93_2000',
+ 'EPSG', '1352',
+ 'NKG', 'SCOPE_GENERIC'
+);
-- SE
INSERT INTO "helmert_transformation" VALUES (
@@ -2057,6 +2112,116 @@ INSERT INTO "supersession" VALUES (
-------------------------------------------------------
+-- Transformation: NKG_ETRF14 -> ETRF93@1995.0 (NO)
+-------------------------------------------------------
+
+INSERT INTO "other_transformation" (
+ auth_name,
+ code,
+ name,
+ description,
+ method_auth_name,
+ method_code,
+ method_name,
+ source_crs_auth_name,
+ source_crs_code,
+ target_crs_auth_name,
+ target_crs_code,
+ accuracy,
+ operation_version,
+ deprecated
+)
+VALUES(
+ 'NKG', 'NO_2020_INTRAPLATE', -- object auth+code
+ 'ETRF93@2000.0 to ETRF93@1995.0', -- name
+ NULL, -- description
+ 'PROJ', 'PROJString', -- method auth+cod
+ '+proj=deformation +dt=-5 +grids=eur_nkg_nkgrf17vel.tif',
+ 'EPSG','7922', -- source_crs: ETRF93@2000.0
+ 'EPSG','4936', -- target_crs: ETRS89 (NO)
+ 0.005, -- accuracy
+ 'NKG 2020', -- operation_version
+ 0 -- deprecated
+);
+
+INSERT INTO "usage" VALUES (
+ 'NKG', '5058', -- usage auth+code
+ 'other_transformation', -- object_table_name
+ 'NKG', 'NO_2020_INTRAPLATE', -- object auth+code
+ 'EPSG', '1352', -- extent: Norway - onshore and offshore
+ 'NKG', 'SCOPE_GENERIC' -- scope
+);
+
+INSERT INTO "concatenated_operation" VALUES(
+ 'NKG', 'ETRF14_TO_NO', -- operation auth+code
+ 'NKG_ETRF14 to ETRS89(NO)', -- name
+ 'Transformation from NKG_ETRF14@2000.0 to ETRF93@1995.0', -- description
+ 'NKG', 'ETRF14',-- source_crs: NKG_ETRF00
+ 'EPSG','4936', -- target_crs: ETRS89 (NO)
+ 0.01, -- accuracy
+ 'NKG 2020', -- operation_version
+ 0 -- deprecated
+);
+
+INSERT INTO "concatenated_operation_step" (
+ operation_auth_name, operation_code, step_number, step_auth_name, step_code
+) VALUES
+ ('NKG', 'ETRF14_TO_NO', 1, 'NKG', 'PAR_2020_NO'),
+ ('NKG', 'ETRF14_TO_NO', 2, 'NKG', 'NO_2020_INTRAPLATE')
+;
+
+INSERT INTO "usage" VALUES (
+ 'NKG', '5059', -- usage auth+code
+ 'concatenated_operation', -- object_table_name
+ 'NKG', 'ETRF14_TO_NO', -- object auth+code
+ 'EPSG', '1352', -- extent: Norway - onshore and offshore
+ 'NKG', 'SCOPE_GENERIC' -- scope auth+code
+);
+
+
+-------------------------------------------------------
+-- Transformation: ITRF2014 -> ETRF93@1995.0 (NO)
+-------------------------------------------------------
+
+INSERT INTO "concatenated_operation" VALUES (
+ 'NKG', 'ITRF2014_TO_NO', -- operation auth+code
+ 'ITRF2014 to ETRS89(NO)', -- name
+ 'Time-dependent transformation from ITRF2014 to ETRS89(NO)', -- description
+ 'EPSG', '7789', -- source_crs: ITRF2014
+ 'EPSG', '4936', -- target_crs: ETRS89(NO)
+ 0.01, -- accuracy
+ 'NKG 2020', -- operation_version
+ 0 -- deprecated
+);
+
+INSERT INTO "concatenated_operation_step" (
+ operation_auth_name, operation_code, step_number, step_auth_name, step_code
+) VALUES
+ ('NKG', 'ITRF2014_TO_NO', 1, 'EPSG', '8366'), -- ITRF2014 -> ETRF2014
+ ('NKG', 'ITRF2014_TO_NO', 2, 'NKG', 'NKG_ETRF14_TO_ETRF2014'),
+ ('NKG', 'ITRF2014_TO_NO', 3, 'NKG', 'NKG_ETRF14_ETRF93_2000'),
+ ('NKG', 'ITRF2014_TO_NO', 4, 'NKG', 'NO_2020_INTRAPLATE')
+;
+
+INSERT INTO "usage" VALUES (
+ 'NKG', '5060', -- usage auth+code
+ 'concatenated_operation', -- object_table_name
+ 'NKG', 'ITRF2014_TO_NO', -- object auth+code
+ 'EPSG', '1352', -- extent: Norway - onshore and offshore
+ 'NKG', 'SCOPE_GENERIC' -- scope auth+code
+);
+
+INSERT INTO "supersession" VALUES (
+ 'concatenated_operation',
+ 'NKG', 'ITRF2000_TO_NO',
+ 'concatenated_operation',
+ 'NKG', 'ITRF2014_TO_NO',
+ 'NKG',
+ 0
+);
+
+
+-------------------------------------------------------
-- Transformation: NKG_ETRF14 -> ETRF97@1999.5 (SE)
-------------------------------------------------------
diff --git a/data/sql/nkg_post_customizations.sql b/data/sql/nkg_post_customizations.sql
new file mode 100644
index 00000000..68bf0dbf
--- /dev/null
+++ b/data/sql/nkg_post_customizations.sql
@@ -0,0 +1,13 @@
+
+-- Append NKG to authority references
+UPDATE
+ authority_to_authority_preference
+SET
+ allowed_authorities = allowed_authorities || ',NKG'
+WHERE
+ source_auth_name = 'EPSG' AND target_auth_name = 'EPSG';
+
+INSERT INTO "authority_to_authority_preference"
+ (source_auth_name,target_auth_name, allowed_authorities)
+VALUES
+ ('NKG', 'EPSG', 'NKG,PROJ,EPSG');
diff --git a/data/sql/other_transformation_custom.sql b/data/sql/other_transformation_custom.sql
index c0c2bf11..311db235 100644
--- a/data/sql/other_transformation_custom.sql
+++ b/data/sql/other_transformation_custom.sql
@@ -1,5 +1,21 @@
-- This file is hand generated.
+-- Norway triangulated files
+
+INSERT INTO other_transformation VALUES(
+ 'PROJ','NGO48_TO_ETRS89NO','NGO 1948 to ETRS89 (2)',
+ 'Transformation based on a triangulated irregular network',
+ 'PROJ','PROJString',
+ '+proj=pipeline ' ||
+ '+step +proj=axisswap +order=2,1 ' ||
+ '+step +proj=tinshift +file=no_kv_ETRS89NO_NGO48_TIN.json +inv ' ||
+ '+step +proj=axisswap +order=2,1',
+ 'EPSG','4273',
+ 'EPSG','4258',
+ 0.1,
+ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
+INSERT INTO "usage" VALUES('PROJ','NGO48_TO_ETRS89NO_USAGE','other_transformation','PROJ','NGO48_TO_ETRS89NO','EPSG','1352','EPSG','1031');
+
-- Finland triangulated files
INSERT INTO other_transformation VALUES(
diff --git a/data/sql/proj_db_table_defs.sql b/data/sql/proj_db_table_defs.sql
index b879cab8..037e2b6d 100644
--- a/data/sql/proj_db_table_defs.sql
+++ b/data/sql/proj_db_table_defs.sql
@@ -1089,7 +1089,7 @@ CREATE TABLE grid_alternatives(
proj_grid_name TEXT NOT NULL, -- PROJ >= 7 grid name (e.g us_nga_egm08_25.tif)
old_proj_grid_name TEXT, -- PROJ < 7 grid name (e.g egm08_25.gtx)
proj_grid_format TEXT NOT NULL, -- 'GTiff', 'GTX', 'NTv2', JSON
- proj_method TEXT NOT NULL, -- hgridshift, vgridshift, geoid_like, geocentricoffset or tinshift
+ proj_method TEXT NOT NULL, -- hgridshift, vgridshift, geoid_like, geocentricoffset, tinshift or velocity_grid
inverse_direction BOOLEAN NOT NULL CHECK (inverse_direction IN (0, 1)), -- whether the PROJ grid direction is reversed w.r.t to the authority one (TRUE in that case)
package_name TEXT, -- no longer used. Must be NULL
url TEXT, -- optional URL where to download the PROJ grid
@@ -1099,7 +1099,7 @@ CREATE TABLE grid_alternatives(
CONSTRAINT fk_grid_alternatives_grid_packages FOREIGN KEY (package_name) REFERENCES grid_packages(package_name),
CONSTRAINT check_grid_alternatives_grid_fromat CHECK (proj_grid_format IN ('GTiff', 'GTX', 'NTv2', 'JSON')),
- CONSTRAINT check_grid_alternatives_proj_method CHECK (proj_method IN ('hgridshift', 'vgridshift', 'geoid_like', 'geocentricoffset', 'tinshift')),
+ CONSTRAINT check_grid_alternatives_proj_method CHECK (proj_method IN ('hgridshift', 'vgridshift', 'geoid_like', 'geocentricoffset', 'tinshift', 'velocity_grid')),
CONSTRAINT check_grid_alternatives_inverse_direction CHECK (NOT(proj_method = 'geoid_like' AND inverse_direction = 1)),
CONSTRAINT check_grid_alternatives_package_name CHECK (package_name IS NULL),
CONSTRAINT check_grid_alternatives_direct_download_url CHECK (NOT(direct_download IS NULL AND url IS NOT NULL)),
diff --git a/data/sql_filelist.cmake b/data/sql_filelist.cmake
index e7bca4ff..2103e19e 100644
--- a/data/sql_filelist.cmake
+++ b/data/sql_filelist.cmake
@@ -32,9 +32,10 @@ set(SQL_FILES
"${SQL_DIR}/deprecation.sql"
"${SQL_DIR}/esri.sql"
"${SQL_DIR}/ignf.sql"
+ "${SQL_DIR}/nkg.sql"
"${SQL_DIR}/grid_alternatives.sql"
"${SQL_DIR}/grid_alternatives_generated_noaa.sql"
"${SQL_DIR}/customizations.sql"
- "${SQL_DIR}/nkg.sql"
+ "${SQL_DIR}/nkg_post_customizations.sql"
"${SQL_DIR}/commit.sql"
)