diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-06-06 22:23:43 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-06-06 22:24:14 +0200 |
| commit | a24cf969aab61d950de916b48de88229b05a00f4 (patch) | |
| tree | 5224c776fc48ea4de68950ed383d500b7254e165 /test/unit/test_operation.cpp | |
| parent | c6ff686bf8334efce9995dacc899022d3a5b813b (diff) | |
| download | PROJ-a24cf969aab61d950de916b48de88229b05a00f4.tar.gz PROJ-a24cf969aab61d950de916b48de88229b05a00f4.zip | |
Database: make sure we can deal with 'Geog3D to Geog2D+GravityRelatedHeight' records as we do with the more common 'Geographic3D to GravityRelatedHeight'
Diffstat (limited to 'test/unit/test_operation.cpp')
| -rw-r--r-- | test/unit/test_operation.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index 630492e6..6ef6e686 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -4900,6 +4900,33 @@ TEST(operation, vertCRS_to_geogCRS_context) { "+step +proj=unitconvert +xy_in=rad +xy_out=deg " "+step +proj=axisswap +order=2,1"); } + { + // Test actually the database where we derive records using the more + // classic 'Geographic3D to GravityRelatedHeight' method from + // records using EPSG:9635 + //'Geog3D to Geog2D+GravityRelatedHeight (US .gtx)' method + auto ctxt = CoordinateOperationContext::create( + AuthorityFactory::create(DatabaseContext::create(), std::string()), + nullptr, 0.0); + ctxt->setSpatialCriterion( + CoordinateOperationContext::SpatialCriterion::PARTIAL_INTERSECTION); + auto list = CoordinateOperationFactory::create()->createOperations( + // Baltic 1957 height + authFactory->createCoordinateReferenceSystem("8357"), + // ETRS89 + authFactory->createCoordinateReferenceSystem("4937"), ctxt); + ASSERT_EQ(list.size(), 1U); + EXPECT_EQ( + list[0]->exportToPROJString(PROJStringFormatter::create().get()), + "+proj=pipeline " + "+step +proj=axisswap +order=2,1 " + "+step +proj=unitconvert +xy_in=deg +xy_out=rad " + "+step +proj=vgridshift " + "+grids=sk_gku_Slovakia_ETRS89h_to_Baltic1957.tif " + "+multiplier=1 " + "+step +proj=unitconvert +xy_in=rad +xy_out=deg " + "+step +proj=axisswap +order=2,1"); + } } // --------------------------------------------------------------------------- |
