aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_operation.cpp
diff options
context:
space:
mode:
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);