diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-25 21:10:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-25 21:10:18 +0200 |
| commit | 9ff543c4ffd86152bc58d0a0164b2ce9ebbb8bec (patch) | |
| tree | 3eaff4e515826148a53cf717096d062d38c8e2f2 /test/unit/test_crs.cpp | |
| parent | 4ade1b2eb1ba2b28a76f446176da24712ce67720 (diff) | |
| parent | 172744361c83d2a40c11600a398a0e1668052031 (diff) | |
| download | PROJ-9ff543c4ffd86152bc58d0a0164b2ce9ebbb8bec.tar.gz PROJ-9ff543c4ffd86152bc58d0a0164b2ce9ebbb8bec.zip | |
Merge pull request #2240 from rouault/fix_identification_epsg_3035
Fix identification of (one of the) ESRI WKT formulations of EPSG:3035
Diffstat (limited to 'test/unit/test_crs.cpp')
| -rw-r--r-- | test/unit/test_crs.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp index cf285b0a..8fdd8a01 100644 --- a/test/unit/test_crs.cpp +++ b/test/unit/test_crs.cpp @@ -2523,7 +2523,7 @@ TEST(crs, projectedCRS_identify_db) { auto res = crs->identify(factoryAll); ASSERT_EQ(res.size(), 1U); EXPECT_EQ(res.front().first->getEPSGCode(), 6670); - EXPECT_EQ(res.front().second, 70); + EXPECT_EQ(res.front().second, 90); } { // Test case of https://github.com/OSGeo/PROJ/issues/2116 @@ -2616,6 +2616,30 @@ TEST(crs, projectedCRS_identify_db) { EXPECT_EQ(res.front().first->getEPSGCode(), 32631); EXPECT_EQ(res.front().second, 60); } + { + // Test case of https://github.com/qgis/QGIS/issues/36111 + // The name of the CRS to identify is + // ETRS89_LAEA_Europe + // We identify it through a registered EPSG alias "ETRS89 / LAEA Europe" + auto obj = WKTParser().attachDatabaseContext(dbContext).createFromWKT( + "PROJCS[\"ETRS89_LAEA_Europe\"," + "GEOGCS[\"GCS_ETRS_1989\",DATUM[\"D_ETRS_1989\"," + "SPHEROID[\"GRS_1980\",6378137.0,298.257222101]]," + "PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]," + "PROJECTION[\"Lambert_Azimuthal_Equal_Area\"]," + "PARAMETER[\"false_easting\",4321000.0]," + "PARAMETER[\"false_northing\",3210000.0]," + "PARAMETER[\"central_meridian\",10.0]," + "PARAMETER[\"latitude_of_origin\",52.0]," + "UNIT[\"Meter\",1.0]]"); + auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj); + ASSERT_TRUE(crs != nullptr); + auto factoryAll = AuthorityFactory::create(dbContext, std::string()); + auto res = crs->identify(factoryAll); + ASSERT_EQ(res.size(), 1U); + EXPECT_EQ(res.front().first->getEPSGCode(), 3035); + EXPECT_EQ(res.front().second, 90); + } } // --------------------------------------------------------------------------- |
