From d436d4fbbfa030b12d6d051a809a6be6c220d747 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 3 Apr 2021 15:34:46 +0200 Subject: cass: rewrite ellipsoidal formulas in a clearer way using EPSG guidance note names --- test/gie/builtins.gie | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index b3c84f74..3b4b098b 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 -- cgit v1.2.3 From 970c849cc70ccb8a016c9834daef70d28e224ae9 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 3 Apr 2021 20:18:08 +0200 Subject: cass: add +hyperbolic switch for variant used by EPSG:3139 'Vanua Levu 1915 / Vanua Levu Grid' --- test/gie/builtins.gie | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 3b4b098b..8c0cf6d2 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -850,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 -- cgit v1.2.3 From 2594b3a2240db7d7007e1c98f08762613b7f7e73 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 3 Apr 2021 16:16:22 +0200 Subject: Add mapping between EPSG method 'Hyperbolic Cassini-Soldner' and +proj=cass +hyperbolic --- test/unit/test_operation.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') 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); -- cgit v1.2.3