diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-03-19 18:03:10 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2022-03-19 20:22:56 +0100 |
| commit | 169e1c5691858e0846eb7ede6b3778f8ec0a2892 (patch) | |
| tree | 171f26e1a9b4418bd02e5ac195ea529865c278bd /test/unit/test_io.cpp | |
| parent | 8c51e3c99acc9083d82a5a7a6dae146e2a689f8e (diff) | |
| download | PROJ-169e1c5691858e0846eb7ede6b3778f8ec0a2892.tar.gz PROJ-169e1c5691858e0846eb7ede6b3778f8ec0a2892.zip | |
Fix datum names when importing from PROJ4 crs strings (affects some transformations using geoidgrids)
When importing from a PROJ4 string with +towgs84, +nadgrids or
+geoidgrids terms, the datum name was just set to 'unknown'. So for
example the datums of '+proj=longlat +ellps=GRS80 +towgs84=1,2,3' and
'+proj=longlat +ellps=GRS80 +towgs84=4,5,6' were considered identical,
because they had the same name 'unknown' and used the same ellipsoid.
This affected the transformation of such CRS when they had an
additional +geoidgrids term, which resulted in an erroneous +proj=push
+v_1 +v_2 step to be added to preserve the horizontal coordinates.
Diffstat (limited to 'test/unit/test_io.cpp')
| -rw-r--r-- | test/unit/test_io.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index f883ddb7..dc511b80 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -9852,7 +9852,9 @@ TEST(io, projparse_merc_not_quite_google_mercator) { EXPECT_TRUE(wkt.find("METHOD[\"Popular Visualisation Pseudo " "Mercator\",ID[\"EPSG\",1024]") != std::string::npos) << wkt; - EXPECT_TRUE(wkt.find("DATUM[\"unknown\",") != std::string::npos) << wkt; + EXPECT_TRUE(wkt.find("DATUM[\"unknown using nadgrids=@null\",") != + std::string::npos) + << wkt; EXPECT_EQ( replaceAll(crs->exportToPROJString(PROJStringFormatter::create().get()), |
