aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_operation.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-09-12 15:55:04 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-09-12 22:57:25 +0200
commiteed28e5183579d09e102d1ad72e91fc82005dfe8 (patch)
tree7986041f092cb4dcf53f61bdbe5f95f9e4705a08 /test/unit/test_operation.cpp
parent63857c92b271bbcd10df0a032304982011acb2a9 (diff)
downloadPROJ-eed28e5183579d09e102d1ad72e91fc82005dfe8.tar.gz
PROJ-eed28e5183579d09e102d1ad72e91fc82005dfe8.zip
createOperations(): use more candidates when transforming between a geographic and vertical CRS
For example when transforming from NAD83+NAVD88 height to WGS84, there is no transformation between NAVD88 height to WGS84. In that case, use all potential transformations from NAVD88 height to another geographic CRS for the vertical part.
Diffstat (limited to 'test/unit/test_operation.cpp')
-rw-r--r--test/unit/test_operation.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index a3b49ba9..e3eb4b7c 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -6859,23 +6859,28 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
{
auto ctxt =
CoordinateOperationContext::create(authFactory, nullptr, 0.0);
+ ctxt->setGridAvailabilityUse(
+ CoordinateOperationContext::GridAvailabilityUse::
+ IGNORE_GRID_AVAILABILITY);
auto list = CoordinateOperationFactory::create()->createOperations(
authFactory->createCoordinateReferenceSystem(
"5500"), // NAD83(NSRS2007) + NAVD88 height
authFactory->createCoordinateReferenceSystem("4979"), // WGS 84
ctxt);
ASSERT_GE(list.size(), 1U);
- EXPECT_TRUE(list[0]->hasBallparkTransformation());
EXPECT_EQ(list[0]->nameStr(),
- "NAD83(NSRS2007) to WGS 84 (1) + Transformation from NAVD88 "
- "height to WGS 84 (ballpark vertical transformation, without "
- "ellipsoid height to vertical height correction)");
+ "NAD83(NSRS2007) to WGS 84 (1) + "
+ "Inverse of NAD83(2011) to NAVD88 height (1)");
EXPECT_EQ(list[0]->exportToPROJString(
PROJStringFormatter::create(
PROJStringFormatter::Convention::PROJ_5,
authFactory->databaseContext())
.get()),
- "+proj=noop");
+ "+proj=pipeline +step +proj=axisswap +order=2,1 "
+ "+step +proj=unitconvert +xy_in=deg +xy_out=rad "
+ "+step +proj=vgridshift +grids=g2012bu0.gtx +multiplier=1 "
+ "+step +proj=unitconvert +xy_in=rad +xy_out=deg "
+ "+step +proj=axisswap +order=2,1");
}
}