aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_operation.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-04-16 19:02:14 +0200
committerGitHub <noreply@github.com>2020-04-16 19:02:14 +0200
commitff8258bcdc996522a6059a8134c994487372008a (patch)
tree85b618ca266ca14334452b3907f42c6ee0cd6dc1 /test/unit/test_operation.cpp
parent000fa21d070e64200bc877b9d14444262e1a14b5 (diff)
parent0cd2912037001129ba19a50a70ff4bf28a431082 (diff)
downloadPROJ-ff8258bcdc996522a6059a8134c994487372008a.tar.gz
PROJ-ff8258bcdc996522a6059a8134c994487372008a.zip
Merge pull request #2157 from rouault/map_esri_54098
Adams Square II: map ESRI WKT to PROJ string, and implement iterative inverse method
Diffstat (limited to 'test/unit/test_operation.cpp')
-rw-r--r--test/unit/test_operation.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index 854f813c..4aa9d01e 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -4195,6 +4195,29 @@ TEST(operation, laborde_oblique_mercator) {
// ---------------------------------------------------------------------------
+TEST(operation, adams_ws2_export) {
+ auto dbContext = DatabaseContext::create();
+ // ESRI:54098 WGS_1984_Adams_Square_II
+ auto crs = AuthorityFactory::create(dbContext, "ESRI")
+ ->createProjectedCRS("54098");
+ EXPECT_EQ(crs->exportToPROJString(PROJStringFormatter::create().get()),
+ "+proj=adams_ws2 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m "
+ "+no_defs +type=crs");
+}
+
+// ---------------------------------------------------------------------------
+
+TEST(operation, adams_ws2_export_failure) {
+ auto dbContext = DatabaseContext::create();
+ // ESRI:54099 WGS_1984_Spilhaus_Ocean_Map_in_Square
+ auto crs = AuthorityFactory::create(dbContext, "ESRI")
+ ->createProjectedCRS("54099");
+ EXPECT_THROW(crs->exportToPROJString(PROJStringFormatter::create().get()),
+ FormattingException);
+}
+
+// ---------------------------------------------------------------------------
+
TEST(operation, PROJ_based) {
auto conv = SingleOperation::createPROJBased(PropertyMap(), "+proj=merc",
nullptr, nullptr);