From a3286f4f46cdafa4c05e3ec86f4a52fdca0f33d3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 19 May 2022 11:22:32 +0200 Subject: [PATCH] Merge pull request #3207 from rouault/epsg_10_064 Database: update to EPSG 10.064 --- data/sql/geodetic_crs.sql | 2 ++ data/sql/helmert_transformation.sql | 8 ++++++++ data/sql/metadata.sql | 4 ++-- src/iso19111/operation/transformation.cpp | 8 ++++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/data/sql/geodetic_crs.sql b/data/sql/geodetic_crs.sql index ace066d35f..442a0f8c21 100644 --- a/data/sql/geodetic_crs.sql +++ b/data/sql/geodetic_crs.sql @@ -2176,5 +2176,7 @@ INSERT INTO "geodetic_crs" VALUES('EPSG','9974','FNL22-IRF',NULL,'geographic 2D' INSERT INTO "usage" VALUES('EPSG','17451','geodetic_crs','EPSG','9974','EPSG','4664','EPSG','1141'); INSERT INTO "geodetic_crs" VALUES('EPSG','9988','ITRF2020',NULL,'geocentric','EPSG','6500','EPSG','1322',NULL,0); INSERT INTO "usage" VALUES('EPSG','17904','geodetic_crs','EPSG','9988','EPSG','2830','EPSG','1027'); +INSERT INTO "geodetic_crs" VALUES('EPSG','9989','ITRF2020',NULL,'geographic 3D','EPSG','6423','EPSG','1322',NULL,0); +INSERT INTO "usage" VALUES('EPSG','17902','geodetic_crs','EPSG','9989','EPSG','1262','EPSG','1027'); INSERT INTO "geodetic_crs" VALUES('EPSG','9990','ITRF2020',NULL,'geographic 2D','EPSG','6422','EPSG','1322',NULL,0); INSERT INTO "usage" VALUES('EPSG','17901','geodetic_crs','EPSG','9990','EPSG','1262','EPSG','1027'); diff --git a/data/sql/helmert_transformation.sql b/data/sql/helmert_transformation.sql index e910d0dc9f..017367081d 100644 --- a/data/sql/helmert_transformation.sql +++ b/data/sql/helmert_transformation.sql @@ -2481,6 +2481,14 @@ INSERT INTO "helmert_transformation" VALUES('EPSG','9937','LUREF to ETRS89 (7)', INSERT INTO "usage" VALUES('EPSG','17307','helmert_transformation','EPSG','9937','EPSG','1146','EPSG','1283'); INSERT INTO "helmert_transformation" VALUES('EPSG','9938','LUREF to ETRS89 (8)','LUREF 2020 parameters. For an equivalent CT using the Molodensky-Badekas method see CT 9937. Defines LUREF from 2020. Replaces LUREF 2014 parameters (CT 9899). Info source gives CT in reverse direction. Derived using ETRF2000 @2013-01-27.','EPSG','9607','Coordinate Frame rotation (geog2D domain)','EPSG','4181','EPSG','4258',0.0,-189.228,12.0035,-42.6303,'EPSG','9001',0.48171,3.09948,-2.68639,'EPSG','9104',0.46346,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ACT-Lux CF 2020',0); INSERT INTO "usage" VALUES('EPSG','17308','helmert_transformation','EPSG','9938','EPSG','1146','EPSG','1283'); +INSERT INTO "helmert_transformation" VALUES('EPSG','9960','WGS 84 (Transit) to WGS 84 (G730) (1)','Scale difference in ppb where 1/billion = 1E-9 or nm/m. Derived through ITRF90 and ITRF91 at epoch 1990.5. Parameter values valid at other epochs including 2005.0.','EPSG','1032','Coordinate Frame rotation (geocentric domain)','EPSG','7815','EPSG','7656',0.7,-58.0,521.0,239.0,'EPSG','1025',18.3,-0.3,7.0,'EPSG','1031',10.7,'EPSG','1028',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KD2022-Wld',0); +INSERT INTO "usage" VALUES('EPSG','17491','helmert_transformation','EPSG','9960','EPSG','1262','EPSG','1026'); +INSERT INTO "helmert_transformation" VALUES('EPSG','9961','WGS 84 (G730) to WGS 84 (G873) (1)','Scale difference in ppb where 1/billion = 1E-9 or nm/m. Derived via ITRF91 through ITRF94 at epoch 1995.5. Parameter values valid at other epochs including 2005.0.','EPSG','1032','Coordinate Frame rotation (geocentric domain)','EPSG','7656','EPSG','7658',0.04,-20.0,-16.0,14.0,'EPSG','1025',0.0,0.0,0.0,'EPSG','1031',-0.69,'EPSG','1028',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KD2022-Wld',0); +INSERT INTO "usage" VALUES('EPSG','17492','helmert_transformation','EPSG','9961','EPSG','1262','EPSG','1026'); +INSERT INTO "helmert_transformation" VALUES('EPSG','9962','WGS 84 (G873) to WGS 84 (G1150) (1)','Scale difference in ppb where 1/billion = 1E-9 or nm/m. Derived via ITRF94 through ITRF2000. May be approximated to 0.2m using 7-parameter CF method 1032 with parameters for epoch 1999.50 of tX=1.1mm tY=-8.0mm tZ=14.3mm rX=0 rY=0 rZ=0.05mas dS=1.505ppb.','EPSG','1056','Time-dependent Coordinate Frame rotation (geocen)','EPSG','7658','EPSG','7660',0.03,1.1,-4.7,22.0,'EPSG','1025',0.0,0.0,0.16,'EPSG','1031',1.45,'EPSG','1028',0.0,0.6,1.4,'EPSG','1027',0.0,0.0,0.02,'EPSG','1032',-0.01,'EPSG','1030',2005.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,'KD2022-Wld',0); +INSERT INTO "usage" VALUES('EPSG','18078','helmert_transformation','EPSG','9962','EPSG','1262','EPSG','1026'); +INSERT INTO "helmert_transformation" VALUES('EPSG','9963','WGS 84 (G1150) to WGS 84 (G1674) (1)','Scale difference in ppb where 1/billion = 1E-9 or nm/m. Derived via ITRF2005. May be approximated to 0.4m using 7-parameter CF method 1032 with parameters for epoch 2007.50 of tX=-2.65mm tY=1.35mm tZ=27.7mm rX=-0.27mas rY=027mas rZ=-0.38 mas dS=1.88ppb.','EPSG','1056','Time-dependent Coordinate Frame rotation (geocen)','EPSG','7660','EPSG','7662',0.02,-2.4,1.6,23.2,'EPSG','1025',-0.27,0.27,-0.38,'EPSG','1031',2.08,'EPSG','1028',-0.1,-0.1,1.8,'EPSG','1027',0.0,0.0,0.0,'EPSG','1032',-0.08,'EPSG','1030',2005.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,'KD2022-Wld',0); +INSERT INTO "usage" VALUES('EPSG','17500','helmert_transformation','EPSG','9963','EPSG','1262','EPSG','1026'); INSERT INTO "helmert_transformation" VALUES('EPSG','9991','ITRF2014 to ITRF2020 (1)','IERS describes CT in opposite direction. Estimated using core network of 131 stations at 105 sites. Scale difference in ppb and scale difference rate in ppb/yr where 1/billion = 1E-9 or nm/m.','EPSG','1053','Time-dependent Position Vector tfm (geocentric)','EPSG','7789','EPSG','9988',0.001,1.4,0.9,-1.4,'EPSG','1025',0.0,0.0,0.0,'EPSG','1031',0.42,'EPSG','1028',0.0,0.1,-0.2,'EPSG','1027',0.0,0.0,0.0,'EPSG','1032',0.0,'EPSG','1030',2015.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,'IERS-Wld',0); INSERT INTO "usage" VALUES('EPSG','17933','helmert_transformation','EPSG','9991','EPSG','1262','EPSG','1027'); INSERT INTO "helmert_transformation" VALUES('EPSG','9992','ITRF2008 to ITRF2020 (1)','IERS describes CT in opposite direction. Parameter values derived from those already published between ITRF2020, ITRF2014 and ITRF2008. Scale difference in ppb and scale difference rate in ppb/yr where 1/billion = 1E-9 or nm/m.','EPSG','1053','Time-dependent Position Vector tfm (geocentric)','EPSG','5332','EPSG','9988',0.01,-0.2,-1.0,-3.3,'EPSG','1025',0.0,0.0,0.0,'EPSG','1031',0.29,'EPSG','1028',0.0,0.1,-0.1,'EPSG','1027',0.0,0.0,0.0,'EPSG','1032',-0.03,'EPSG','1030',2015.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,'IERS-Wld',0); diff --git a/data/sql/metadata.sql b/data/sql/metadata.sql index 79507d5c4e..95d200841e 100644 --- a/data/sql/metadata.sql +++ b/data/sql/metadata.sql @@ -9,8 +9,8 @@ INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MAJOR', 1); INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MINOR', 2); -INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.063'); -INSERT INTO "metadata" VALUES('EPSG.DATE', '2022-05-08'); +INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.064'); +INSERT INTO "metadata" VALUES('EPSG.DATE', '2022-05-19'); -- The value of ${PROJ_VERSION} is substituted at build time by the actual -- value. diff --git a/src/iso19111/operation/transformation.cpp b/src/iso19111/operation/transformation.cpp index 49f0b05703..d47edd0032 100644 --- a/src/iso19111/operation/transformation.cpp +++ b/src/iso19111/operation/transformation.cpp @@ -1429,6 +1429,8 @@ createApproximateInverseIfPossible(const Transformation *op) { metadata::Identifier::EPSG) .set(metadata::Identifier::CODE_KEY, method_epsg_code); } + bool exactInverse = + (neg_rx == 0 && neg_ry == 0 && neg_rz == 0 && neg_scaleDiff == 0); if (fifteenParamsTransform) { double neg_rate_x = negate(op->parameterValueNumeric( EPSG_CODE_PARAMETER_RATE_X_AXIS_TRANSLATION, @@ -1454,9 +1456,11 @@ createApproximateInverseIfPossible(const Transformation *op) { double referenceEpochYear = op->parameterValueNumeric(EPSG_CODE_PARAMETER_REFERENCE_EPOCH, common::UnitOfMeasure::YEAR); + exactInverse &= (neg_rate_rx == 0 && neg_rate_ry == 0 && + neg_rate_rz == 0 && neg_rate_scaleDiff == 0); return util::nn_static_pointer_cast( createFifteenParamsTransform( - createPropertiesForInverse(op, false, true), + createPropertiesForInverse(op, false, !exactInverse), methodProperties, op->targetCRS(), op->sourceCRS(), neg_x, neg_y, neg_z, neg_rx, neg_ry, neg_rz, neg_scaleDiff, neg_rate_x, neg_rate_y, neg_rate_z, @@ -1467,7 +1471,7 @@ createApproximateInverseIfPossible(const Transformation *op) { } else { return util::nn_static_pointer_cast( createSevenParamsTransform( - createPropertiesForInverse(op, false, true), + createPropertiesForInverse(op, false, !exactInverse), methodProperties, op->targetCRS(), op->sourceCRS(), neg_x, neg_y, neg_z, neg_rx, neg_ry, neg_rz, neg_scaleDiff, op->coordinateOperationAccuracies()))