aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-12-23 19:12:22 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-12-23 19:12:22 +0100
commit366ab091c7d23807635684431eb848af24301edc (patch)
tree53f2ceb46597858f2393e95d0b0d974d2d632be4 /test
parente503454b651704619a87b78a1c28c10ac9529fed (diff)
downloadPROJ-366ab091c7d23807635684431eb848af24301edc.tar.gz
PROJ-366ab091c7d23807635684431eb848af24301edc.zip
test: add explict tests for New Zealand vertical <--> geog3D and vertical <--> vertical transformations
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_operation.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index 8cd7407d..b2cae6df 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -4715,6 +4715,19 @@ TEST(operation, vertCRS_to_geogCRS_context) {
list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=affine +s33=-0.304800609601219");
}
+ {
+ auto ctxt =
+ CoordinateOperationContext::create(authFactory, nullptr, 0.0);
+ auto list = CoordinateOperationFactory::create()->createOperations(
+ // NZVD2016 height
+ authFactory->createCoordinateReferenceSystem("7839"),
+ // NZGD2000
+ authFactory->createCoordinateReferenceSystem("4959"), ctxt);
+ ASSERT_EQ(list.size(), 1U);
+ EXPECT_EQ(
+ list[0]->exportToPROJString(PROJStringFormatter::create().get()),
+ "+proj=vgridshift +grids=nzgeoid2016.gtx +multiplier=1");
+ }
}
// ---------------------------------------------------------------------------
@@ -7174,6 +7187,22 @@ TEST(operation, vertCRS_to_vertCRS_context) {
// ---------------------------------------------------------------------------
+TEST(operation, vertCRS_to_vertCRS_New_Zealand_context) {
+ auto authFactory =
+ AuthorityFactory::create(DatabaseContext::create(), "EPSG");
+ auto ctxt = CoordinateOperationContext::create(authFactory, nullptr, 0.0);
+ auto list = CoordinateOperationFactory::create()->createOperations(
+ // NZVD2016 height
+ authFactory->createCoordinateReferenceSystem("7839"),
+ // Auckland 1946 height
+ authFactory->createCoordinateReferenceSystem("5759"), ctxt);
+ ASSERT_EQ(list.size(), 1U);
+ EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
+ "+proj=vgridshift +grids=auckht1946-nzvd2016.gtx +multiplier=1");
+}
+
+// ---------------------------------------------------------------------------
+
TEST(operation, compoundCRS_to_geogCRS_3D) {
auto compoundcrs_ft_obj = PROJStringParser().createFromPROJString(