diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-10-12 14:52:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-12 14:52:58 +0200 |
| commit | c9c72da7a8b0fbe436b529a7aaffc81f0fabf183 (patch) | |
| tree | 13f40cd204d2a149e810faff93aaae9b67954bbc | |
| parent | ad2ae23edc02701c813ad603846ff370cdef64eb (diff) | |
| parent | 572433ec4d7ef08d99ef163bbf42bdf69d870985 (diff) | |
| download | PROJ-c9c72da7a8b0fbe436b529a7aaffc81f0fabf183.tar.gz PROJ-c9c72da7a8b0fbe436b529a7aaffc81f0fabf183.zip | |
Merge pull request #1667 from rouault/backport-1665-to-6.2
[Backport 6.2] createOperations(): allow transforming from a compoundCRS of a bound verticalCRS to a 2D CRS
| -rw-r--r-- | src/iso19111/coordinateoperation.cpp | 4 | ||||
| -rwxr-xr-x | test/cli/testprojinfo | 4 | ||||
| -rw-r--r-- | test/cli/testprojinfo_out.dist | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index 3ba5a5a2..915ce88f 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -12619,9 +12619,7 @@ CoordinateOperationFactory::Private::createOperations( auto vertCRSOfBaseOfBoundSrc = dynamic_cast<const crs::VerticalCRS *>(boundSrc->baseCRS().get()); - if (vertCRSOfBaseOfBoundSrc && hubSrcGeog && - hubSrcGeog->coordinateSystem()->axisList().size() == 3 && - geogDst->coordinateSystem()->axisList().size() == 3) { + if (vertCRSOfBaseOfBoundSrc && hubSrcGeog) { auto opsFirst = createOperations(sourceCRS, hubSrc, context); if (context.skipHorizontalTransformation) { if (!opsFirst.empty()) diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index d8569a76..3c09a814 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -115,6 +115,10 @@ echo "Testing NGF IGN69 height to RGF93: projinfo -s EPSG:5720 -t EPSG:4965 -o P $EXE -s EPSG:5720 -t EPSG:4965 -o PROJ >>${OUT} 2>&1 echo "" >>${OUT} +echo "Testing -s "+proj=longlat +datum=WGS84 +geoidgrids=@foo.gtx +type=crs" -t EPSG:4326 -o PROJ -q" >> ${OUT} +$EXE -s "+proj=longlat +datum=WGS84 +geoidgrids=@foo.gtx +type=crs" -t EPSG:4326 -o PROJ -q >>${OUT} 2>&1 +echo "" >>${OUT} + # do 'diff' with distribution results echo "diff ${OUT} with testprojinfo_out.dist" diff -u ${OUT} ${TEST_CLI_DIR}/testprojinfo_out.dist diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 2c0a5c05..09e68ca6 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -876,3 +876,6 @@ INVERSE(EPSG):10000, Inverse of RGF93 to NGF IGN69 height (1), 0.5 m, France - m PROJ string: +proj=pipeline +step +inv +proj=vgridshift +grids=ggf97a.txt +multiplier=1 +Testing -s +proj=longlat +datum=WGS84 +geoidgrids=@foo.gtx +type=crs -t EPSG:4326 -o PROJ -q ++proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=vgridshift +grids=@foo.gtx +multiplier=1 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 + |
