aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_io.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-09-15 16:28:36 +0200
committerGitHub <noreply@github.com>2019-09-15 16:28:36 +0200
commit3c0a5f0c147556f3badbef940fe5e415ff6f5708 (patch)
treee7f1cbaa5c7c218b81431280d0b27d004a7f4192 /test/unit/test_io.cpp
parent16ce294aa5246a94e07bad554b007dd8423e5780 (diff)
parent6832bab5bf2ab2f13265fad52456e9a17560b06f (diff)
downloadPROJ-3c0a5f0c147556f3badbef940fe5e415ff6f5708.tar.gz
PROJ-3c0a5f0c147556f3badbef940fe5e415ff6f5708.zip
Merge pull request #1614 from rouault/fixes_related_to_1597
Fixes related to #1597
Diffstat (limited to 'test/unit/test_io.cpp')
-rw-r--r--test/unit/test_io.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index 872038fc..52608a4a 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -7800,6 +7800,10 @@ TEST(io, projparse_somerc) {
EXPECT_TRUE(wkt.find("\"Northing at projection centre\",5") !=
std::string::npos)
<< wkt;
+
+ auto wkt1 = crs->exportToWKT(
+ WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL).get());
+ EXPECT_TRUE(wkt1.find("EXTENSION") == std::string::npos) << wkt1;
}
// ---------------------------------------------------------------------------
@@ -8637,6 +8641,17 @@ TEST(io, projparse_init) {
}
{
+ // Test that +no_defs +type=crs have no effect
+ auto obj = createFromUserInput("+init=epsg:4326 +no_defs +type=crs",
+ dbContext, true);
+ auto crs = nn_dynamic_pointer_cast<GeographicCRS>(obj);
+ ASSERT_TRUE(crs != nullptr);
+
+ auto wkt = crs->exportToWKT(WKTFormatter::create().get());
+ EXPECT_TRUE(wkt.find("GEODCRS[\"WGS 84\"") == 0) << wkt;
+ }
+
+ {
// EPSG:3040 is normally northing-easting order, but in compatibillity
// mode it will be easting-northing
auto obj =