aboutsummaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-11 12:01:59 +0100
committerGitHub <noreply@github.com>2020-01-11 12:01:59 +0100
commit1b7df035f9084096d7ffd49c26618dc0d8ac1c94 (patch)
tree16e9d42a37c876743516281b53f9eaf075658e01 /test/unit
parent921541789ce1203875b36e2ac4726c0447b17a18 (diff)
parentd2674e044505d0fcee920f5c0315d8db6b842caa (diff)
downloadPROJ-1b7df035f9084096d7ffd49c26618dc0d8ac1c94.tar.gz
PROJ-1b7df035f9084096d7ffd49c26618dc0d8ac1c94.zip
Merge pull request #1838 from rouault/limit_datum_name_massaging_wkt1
WKT1_GDAL export: limit datum name massaging to names matching EPSG (fixes #1835)
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/test_crs.cpp14
-rw-r--r--test/unit/test_operation.cpp4
2 files changed, 13 insertions, 5 deletions
diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp
index 82eb4562..e6189a97 100644
--- a/test/unit/test_crs.cpp
+++ b/test/unit/test_crs.cpp
@@ -756,7 +756,9 @@ TEST(crs, EPSG_27561_projected_with_geodetic_in_grad_as_PROJ_string_and_WKT1) {
nn_crs->DerivedCRS::isEquivalentTo(createUnrelatedObject().get()));
auto wkt1 = crs->exportToWKT(
- WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL).get());
+ WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL,
+ DatabaseContext::create())
+ .get());
EXPECT_EQ(
wkt1,
"PROJCS[\"NTF (Paris) / Lambert Nord France\",\n"
@@ -857,7 +859,9 @@ TEST(crs, EPSG_2222_projected_unit_foot_as_PROJ_string_and_WKT1) {
"+x_0=213360 +y_0=0 +datum=NAD83 +units=ft +no_defs +type=crs");
auto wkt1 = crs->exportToWKT(
- WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL).get());
+ WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL,
+ DatabaseContext::create())
+ .get());
EXPECT_EQ(wkt1,
"PROJCS[\"NAD83 / Arizona East (ft)\",\n"
" GEOGCS[\"NAD83\",\n"
@@ -904,11 +908,13 @@ TEST(crs, projected_with_parameter_unit_different_than_cs_unit_as_WKT1) {
ASSERT_TRUE(crs != nullptr);
auto wkt1 = crs->exportToWKT(
- WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL).get());
+ WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL,
+ DatabaseContext::create())
+ .get());
EXPECT_EQ(wkt1,
"PROJCS[\"unknown\",\n"
" GEOGCS[\"unknown\",\n"
- " DATUM[\"Unknown_based_on_GRS80_ellipsoid\",\n"
+ " DATUM[\"Unknown based on GRS80 ellipsoid\",\n"
" SPHEROID[\"GRS 1980\",6378137,298.257222101]],\n"
" PRIMEM[\"Greenwich\",0],\n"
" UNIT[\"degree\",0.0174532925199433,\n"
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index 316745f5..b2c13b6c 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -3258,7 +3258,9 @@ TEST(operation, webmerc_import_from_WKT2_EPSG_3785_deprecated) {
EXPECT_EQ(
crs->exportToWKT(
- WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL).get()),
+ WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL,
+ DatabaseContext::create())
+ .get()),
"PROJCS[\"Popular Visualisation CRS / Mercator\",\n"
" GEOGCS[\"Popular Visualisation CRS\",\n"
" DATUM[\"Popular_Visualisation_Datum\",\n"