aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-04-03 21:59:05 +0200
committerGitHub <noreply@github.com>2021-04-03 21:59:05 +0200
commitb6210a0e25f9810c4af747de492920eb422fb259 (patch)
treefe9a53e6a1969ac0435b6dc4f06aed5763b62055 /test
parent722cf8840c390fa9c5bb34d6a882cf072dd77044 (diff)
parent2594b3a2240db7d7007e1c98f08762613b7f7e73 (diff)
downloadPROJ-b6210a0e25f9810c4af747de492920eb422fb259.tar.gz
PROJ-b6210a0e25f9810c4af747de492920eb422fb259.zip
Merge pull request #2637 from rouault/hyperbolic_cass
Add support for hyperbolic Cassini-Soldner
Diffstat (limited to 'test')
-rw-r--r--test/gie/builtins.gie13
-rw-r--r--test/unit/test_operation.cpp12
2 files changed, 25 insertions, 0 deletions
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index b3c84f74..8c0cf6d2 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -809,6 +809,7 @@ operation +proj=cass +ellps=GRS80
tolerance 0.1 mm
accept 2 1
expect 222605.285776991 110642.229253999
+roundtrip 1
accept 2 -1
expect 222605.285776991 -110642.229253999
accept -2 1
@@ -849,6 +850,18 @@ expect -0.001790493 0.000895247
accept -200 -100
expect -0.001790493 -0.000895247
+-------------------------------------------------------------------------------
+# Hyperbolic variant: test point from EPSG Guidance Note 7.2
+operation +proj=cass +hyperbolic +a=6378306.376305601 +rf=293.466307 \
+ +lat_0=-16.25 +lon_0=179.33333333333333 +to_meter=20.1168 \
+ +x_0=251727.9155424 +y_0=334519.953768
+-------------------------------------------------------------------------------
+
+tolerance 0.1 mm
+accept 179.99433652777776 -16.841456527777776
+expect 16015.289017555102 13369.660053668682
+roundtrip 1
+
===============================================================================
# Central Conic
# Sph
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index 6ddbd9f4..2830ea94 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -4223,6 +4223,18 @@ TEST(operation, adams_ws2_export_failure) {
// ---------------------------------------------------------------------------
+TEST(operation, hyperbolic_cassini_soldner) {
+ auto dbContext = DatabaseContext::create();
+ auto crs =
+ AuthorityFactory::create(dbContext, "EPSG")->createProjectedCRS("3139");
+ EXPECT_EQ(crs->exportToPROJString(PROJStringFormatter::create().get()),
+ "+proj=cass +hyperbolic +lat_0=-16.25 +lon_0=179.333333333333 "
+ "+x_0=251727.9155424 +y_0=334519.953768 "
+ "+a=6378306.3696 +b=6356571.996 +units=link +no_defs +type=crs");
+}
+
+// ---------------------------------------------------------------------------
+
TEST(operation, PROJ_based) {
auto conv = SingleOperation::createPROJBased(PropertyMap(), "+proj=merc",
nullptr, nullptr);