From 9b2b96ef7a343831753679567893d85998e9c9ea Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 28 Dec 2018 22:58:59 +0100 Subject: Operation computation: better take into account when candidate operations have no declared extent --- test/unit/test_operation.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test/unit/test_operation.cpp') diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index a26574fb..71ef666c 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -5340,6 +5340,25 @@ TEST(operation, boundCRS_of_geogCRS_to_geogCRS) { // --------------------------------------------------------------------------- +TEST(operation, boundCRS_of_geogCRS_to_geogCRS_with_area) { + auto boundCRS = BoundCRS::createFromTOWGS84( + GeographicCRS::EPSG_4267, std::vector{1, 2, 3, 4, 5, 6, 7}); + auto authFactory = + AuthorityFactory::create(DatabaseContext::create(), "EPSG"); + auto op = CoordinateOperationFactory::create()->createOperation( + boundCRS, authFactory->createCoordinateReferenceSystem("4326")); + ASSERT_TRUE(op != nullptr); + EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()), + "+proj=pipeline +step +proj=axisswap +order=2,1 +step " + "+proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=cart " + "+ellps=clrk66 +step +proj=helmert +x=1 +y=2 +z=3 +rx=4 +ry=5 " + "+rz=6 +s=7 +convention=position_vector +step +inv +proj=cart " + "+ellps=WGS84 +step +proj=unitconvert +xy_in=rad +xy_out=deg " + "+step +proj=axisswap +order=2,1"); +} + +// --------------------------------------------------------------------------- + TEST(operation, boundCRS_of_geogCRS_to_unrelated_geogCRS) { auto boundCRS = BoundCRS::createFromTOWGS84( GeographicCRS::EPSG_4807, std::vector{1, 2, 3, 4, 5, 6, 7}); -- cgit v1.2.3