diff --git a/data/sql/concatenated_operation.sql b/data/sql/concatenated_operation.sql index 5f14dc90cd..3f29341ec1 100644 --- a/data/sql/concatenated_operation.sql +++ b/data/sql/concatenated_operation.sql @@ -433,5 +433,7 @@ INSERT INTO "concatenated_operation" VALUES('EPSG','9685','ATRF2014 to GDA94 (2) INSERT INTO "usage" VALUES('EPSG','14963','concatenated_operation','EPSG','9685','EPSG','2575','EPSG','1234'); INSERT INTO "concatenated_operation" VALUES('EPSG','9687','GDA94 to WGS 84 (G1762) (2)','See GDA94 to WGS 84 (G1762) (1) (CT code 9686) for conformal-only alternative (i.e. without distortion modelling).','EPSG','4283','EPSG','9057',0.25,'ICSM-Aus Conf+Dist',0); INSERT INTO "usage" VALUES('EPSG','14964','concatenated_operation','EPSG','9687','EPSG','2575','EPSG','1234'); -INSERT INTO "concatenated_operation" VALUES('EPSG','9731','ETRS89 to ETRS89 + Catania 1965 height (1)','','EPSG','4937','EPSG','9724',0.035,'IGM-Ita 2005 Sicily',0); +INSERT INTO "concatenated_operation" VALUES('EPSG','9731','ETRS89 to ETRS89 + Catania 1965 height (1)','','EPSG','4937','EPSG','9724',0.035,'IGM-Ita 2005 Sicily',1); INSERT INTO "usage" VALUES('EPSG','15285','concatenated_operation','EPSG','9731','EPSG','2340','EPSG','1270'); +INSERT INTO "concatenated_operation" VALUES('EPSG','9750','ETRS89 to Catania 1965 height (1)','','EPSG','4937','EPSG','9721',0.035,'IGM-Ita 2005 Sicily',0); +INSERT INTO "usage" VALUES('EPSG','15385','concatenated_operation','EPSG','9750','EPSG','2340','EPSG','1133'); diff --git a/data/sql/concatenated_operation_step.sql b/data/sql/concatenated_operation_step.sql index 6abe069143..83ca7eeca2 100644 --- a/data/sql/concatenated_operation_step.sql +++ b/data/sql/concatenated_operation_step.sql @@ -439,3 +439,5 @@ INSERT INTO "concatenated_operation_step" VALUES('EPSG','9687',1,'EPSG','8447'); INSERT INTO "concatenated_operation_step" VALUES('EPSG','9687',2,'EPSG','8448'); INSERT INTO "concatenated_operation_step" VALUES('EPSG','9731',1,'EPSG','9729'); INSERT INTO "concatenated_operation_step" VALUES('EPSG','9731',2,'EPSG','9726'); +INSERT INTO "concatenated_operation_step" VALUES('EPSG','9750',1,'EPSG','9727'); +INSERT INTO "concatenated_operation_step" VALUES('EPSG','9750',2,'EPSG','9726'); diff --git a/data/sql/extent.sql b/data/sql/extent.sql index 63c6beb74c..834fb41fcd 100644 --- a/data/sql/extent.sql +++ b/data/sql/extent.sql @@ -1956,7 +1956,7 @@ INSERT INTO "extent" VALUES('EPSG','2976','USA - CONUS south of 41°N, east of 7 INSERT INTO "extent" VALUES('EPSG','2977','USA - CONUS north of 41°N, west of 112°W - onshore','United States (USA) - CONUS onshore north of 41°N and west of 112°W - Oregon and Washington; California and Nevada north of 41°N; Utah north of 41°N and west of 112°W; Idaho and Montana west of 112°W.',41.0,49.05,-124.79,-112.0,0); INSERT INTO "extent" VALUES('EPSG','2978','USA - CONUS north of 41°N, 112°W to 95°W','United States (USA) - CONUS north of 41°N and between 112°W and 95°W - North Dakota, South Dakota and Wyoming; Idaho and Montana east of 112°W; Utah north of 41°N and east of 112°W; Nebraska north of 41°N; Iowa north of 41°N and west of 95°W; Minnesota west of 95°W.',41.0,49.38,-112.0,-95.0,0); INSERT INTO "extent" VALUES('EPSG','2979','USA - CONUS north of 41°N, 95°W to 78°W','United States (USA) - CONUS north of 41°N and between 95°W and 78°W - Michigan and Wisconsin; Minnesota east of 95°W; Iowa north of 41°N and east of 95°W; Illinois, Indiana and Ohio north of 41°N; Pennsylvania north of 41°N and west of 78°W; New York west of 78°W.',41.0,49.37,-95.0,-77.99,0); -INSERT INTO "extent" VALUES('EPSG','2980','USA - CONUS north of 41°N, east of 78°W - onshore','United States (USA) - CONUS onshore north of 41°N and east of 78°W - Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island and Vermont; New Jersey north of 41°N; New York and Pennsylvania north of 41°N and east of 78°W.',41.0,47.467893600464,-78.0,-66.917007446289,0); +INSERT INTO "extent" VALUES('EPSG','2980','USA - CONUS north of 41°N, east of 78°W - onshore','United States (USA) - CONUS onshore north of 41°N and east of 78°W - Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island and Vermont; New Jersey north of 41°N; New York and Pennsylvania north of 41°N and east of 78°W.',41.0,47.47,-78.0,-66.91,0); INSERT INTO "extent" VALUES('EPSG','2981','Nigeria - offshore','Nigeria - offshore.',1.92,6.38,2.66,8.49,0); INSERT INTO "extent" VALUES('EPSG','2982','Pakistan - Karachi','Pakistan - Karachi licence area.',24.69,25.76,66.83,68.0,0); INSERT INTO "extent" VALUES('EPSG','2983','Pakistan - East Sind','Pakistan - East Sind.',24.16,28.61,68.27,71.14,0); @@ -3594,5 +3594,5 @@ INSERT INTO "extent" VALUES('EPSG','4615','Norway, Svalbard and Jan Mayen - offs INSERT INTO "extent" VALUES('EPSG','4616','UK - Great Britain onshore; Isle of Man','United Kingdom (UK) - Great Britain - England, Scotland and Wales onshore; Isle of Man onshore.',49.81,60.93,-8.69,1.91,0); INSERT INTO "extent" VALUES('EPSG','4617','Canada - east of 42°W','Canada offshore Atlantic - east of 42°W.',45.53,49.53,-42.0,-40.73,0); INSERT INTO "extent" VALUES('EPSG','4618','Canada - 41°N to 85°N, west of 50°W','Canada - onshore and offshore between 41°N and 85°N and west of 50°W - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon.',41.0,85.0,-141.01,-50.0,0); -INSERT INTO "extent" VALUES('EPSG','4619','Italy - 6°22''E to 18°40''E and north of 35°16''N; San Marino, Vatican City State','Italy - onshore and offshore between 6°22''E and 18°40''E and north of 35°16''N; San Marino, Vatican City State.',35.266666666667,47.094581604004,6.3666666666668,18.666666666667,0); +INSERT INTO "extent" VALUES('EPSG','4619','Italy - 6°22''E to 18°40''E and north of 35°16''N; San Marino, Vatican City State','Italy - onshore and offshore between 6°22''E and 18°40''E and north of 35°16''N; San Marino, Vatican City State.',35.26,47.1,6.36,18.67,0); INSERT INTO "extent" VALUES('EPSG','4620','UK - Tweedmouth to Aberdeen','On or related to the complex of rail routes in the East of Scotland, incorporating the route from Tweedbank through the Borders to Edinburgh; the line from Edinburgh to Aberdeen; routes via Kirkaldy and Cowdenbeath; and routes via Leuchars and Perth to Dundee. ',55.55,57.2,-3.55,-1.95,0); diff --git a/data/sql/helmert_transformation.sql b/data/sql/helmert_transformation.sql index 317cad5318..80bb93c0dd 100644 --- a/data/sql/helmert_transformation.sql +++ b/data/sql/helmert_transformation.sql @@ -2307,7 +2307,7 @@ INSERT INTO "usage" VALUES('EPSG','10941','helmert_transformation','EPSG','9127' INSERT INTO "helmert_transformation" VALUES('EPSG','9128','NAD83(CSRS)v4 to NAD83(CORS96) (1)','Scale difference in ppb where 1/billion = 1E-9 or nm/m. Source and target CRSs defined from ITRF2000 by common transformations (codes 6866 and 8261). 6866 defines CORS96 from 1st January 2002 to 6th September 2011.','EPSG','1065','Time-specific Position Vector transform (geocen)','EPSG','8242','EPSG','6781',0.0,0.0,0.0,0.0,'EPSG','9001',0.0,0.0,0.0,'EPSG','1031',0.0,'EPSG','1028',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2002.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,'ISO-N Am',0); INSERT INTO "usage" VALUES('EPSG','10942','helmert_transformation','EPSG','9128','EPSG','4544','EPSG','1027'); INSERT INTO "helmert_transformation" VALUES('EPSG','9129','NAD83(CSRS)v6 to NAD83(2011) (1)','Scale difference in ppb where 1/billion = 1E-9 or nm/m. Source and target CRSs defined from ITRF2008 by common transformations (codes 7807 and 8264).','EPSG','1065','Time-specific Position Vector transform (geocen)','EPSG','8250','EPSG','6317',0.0,0.0,0.0,0.0,'EPSG','9001',0.0,0.0,0.0,'EPSG','1031',0.0,'EPSG','1028',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2010.0,'EPSG','1029',NULL,NULL,NULL,NULL,NULL,'ISO-N Am',0); -INSERT INTO "usage" VALUES('EPSG','10943','helmert_transformation','EPSG','9129','EPSG','1262','EPSG','1027'); +INSERT INTO "usage" VALUES('EPSG','10943','helmert_transformation','EPSG','9129','EPSG','4544','EPSG','1027'); INSERT INTO "helmert_transformation" VALUES('EPSG','9142','MGI 1901 to KOSOVAREF01 (1)','Derived at 18 points across the area of Kosovo. May be taken as approximate transformation MGI 1901 to WGS 84 (see code 9143).','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','3906','EPSG','9140',1.0,628.54052,192.2538,498.43507,'EPSG','9001',-13.79189,-0.81467,41.21533,'EPSG','9104',-17.40368,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KCA-Kos',0); INSERT INTO "usage" VALUES('EPSG','10951','helmert_transformation','EPSG','9142','EPSG','4542','EPSG','1027'); INSERT INTO "helmert_transformation" VALUES('EPSG','9143','MGI 1901 to WGS 84 (14)','Parameter values from MGI 1901 to KOSOVAREF01 (1) (code 9142). Assumes KOSOVAREF01 and WGS 84 can be considered the same to within the accuracy of the transformation.','EPSG','9606','Position Vector transformation (geog2D domain)','EPSG','3906','EPSG','4326',1.0,628.54052,192.2538,498.43507,'EPSG','9001',-13.79189,-0.81467,41.21533,'EPSG','9104',-17.40368,'EPSG','9202',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'IOGP-Kos',0); diff --git a/data/sql/metadata.sql b/data/sql/metadata.sql index d7cbf026bb..e57b7acac2 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', 1); -INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.022'); -INSERT INTO "metadata" VALUES('EPSG.DATE', '2021-05-16'); +INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.024'); +INSERT INTO "metadata" VALUES('EPSG.DATE', '2021-05-27'); -- The value of ${PROJ_VERSION} is substituted at build time by the actual -- value. diff --git a/scripts/build_db.py b/scripts/build_db.py index c9f6960b7d..ec4b739786 100755 --- a/scripts/build_db.py +++ b/scripts/build_db.py @@ -53,6 +53,9 @@ def ingest_sqlite_dump(cursor, filename): # generated .sql files line = line.replace('INTEGER_OR_TEXT', 'TEXT') + # Same for WITHOUT ROWID + line = line.replace('WITHOUT ROWID', '') + sql += line if sqlite3.complete_statement(sql): sql = sql.strip() diff --git a/src/iso19111/operation/concatenatedoperation.cpp b/src/iso19111/operation/concatenatedoperation.cpp index fda341dd02..20bbce6f06 100644 --- a/src/iso19111/operation/concatenatedoperation.cpp +++ b/src/iso19111/operation/concatenatedoperation.cpp @@ -245,34 +245,6 @@ void ConcatenatedOperation::fixStepsDirection( return false; }; - // Special case for EPSG:9731 "ETRS89 to ETRS89 + Catania 1965 height (1)" - // which chains "ETRS89 to ETRS89 + Genoa 1942 height (1)" and - // "Genoa 1942 height to Catania 1965 height (1)" - if (operationsInOut.size() == 2 && isGeographic(concatOpSourceCRS.get())) { - const auto compoundTarget = - dynamic_cast(concatOpTargetCRS.get()); - const auto compoundTargetOp0 = dynamic_cast( - operationsInOut[0]->targetCRS().get()); - if (compoundTarget && compoundTargetOp0 && - operationsInOut[0]->sourceCRS() && - operationsInOut[1]->sourceCRS() && - operationsInOut[1]->targetCRS() && - concatOpSourceCRS->nameStr() == - compoundTarget->componentReferenceSystems()[0]->nameStr() && - concatOpSourceCRS->nameStr() == - operationsInOut[0]->sourceCRS()->nameStr() && - concatOpSourceCRS->nameStr() == - compoundTargetOp0->componentReferenceSystems()[0]->nameStr() && - compoundTargetOp0->componentReferenceSystems()[1]->nameStr() == - operationsInOut[1]->sourceCRS()->nameStr() && - operationsInOut[1]->targetCRS()->nameStr() == - compoundTarget->componentReferenceSystems()[1]->nameStr()) { - operationsInOut[1]->setCRSs( - NN_NO_CHECK(operationsInOut[0]->targetCRS()), concatOpTargetCRS, - nullptr); - } - } - for (size_t i = 0; i < operationsInOut.size(); ++i) { auto &op = operationsInOut[i]; auto l_sourceCRS = op->sourceCRS(); diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index d7bb7a0715..6c8340aaf2 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -1326,26 +1326,6 @@ TEST( // --------------------------------------------------------------------------- -TEST( - factory, - AuthorityFactory_createCoordinateOperation_concatenated_operation_epsg_9731) { - auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); - auto op = factory->createCoordinateOperation("9731", false); - auto concatenated = nn_dynamic_pointer_cast(op); - ASSERT_TRUE(concatenated != nullptr); - EXPECT_EQ( - concatenated->exportToPROJString(PROJStringFormatter::create().get()), - "+proj=pipeline " - "+step +proj=axisswap +order=2,1 " - "+step +proj=unitconvert +xy_in=deg +xy_out=rad " - "+step +inv +proj=vgridshift +grids=geo_igm_mar06.grd +multiplier=1 " - "+step +proj=unitconvert +xy_in=rad +xy_out=deg " - "+step +proj=axisswap +order=2,1 " - "+step +proj=geogoffset +dh=0.141"); -} - -// --------------------------------------------------------------------------- - static bool in(const std::string &str, const std::vector &list) { for (const auto &listItem : list) { if (str == listItem) { @@ -1365,7 +1345,8 @@ TEST(factory, AuthorityFactory_build_all_concatenated) { AuthorityFactory::ObjectType::CONCATENATED_OPERATION, false); EXPECT_LT(setConcatenatedNoDeprecated.size(), setConcatenated.size()); for (const auto &code : setConcatenated) { - if (in(code, {"8422", "8481", "8482", "8565", "8566", "8572"})) { + if (in(code, + {"8422", "8481", "8482", "8565", "8566", "8572", "9731"})) { EXPECT_THROW(factory->createCoordinateOperation(code, false), FactoryException) << code;