diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-10-02 21:53:44 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-10-02 23:58:08 +0200 |
| commit | 7f7f2921ada88ee90fb81dddb782d47c764642b7 (patch) | |
| tree | 672141a109c6b36d367b10c66858492bf42d4e17 /src | |
| parent | cd00bd6d0c8d13d98756b2356b0ae5fcb1597deb (diff) | |
| download | PROJ-7f7f2921ada88ee90fb81dddb782d47c764642b7.tar.gz PROJ-7f7f2921ada88ee90fb81dddb782d47c764642b7.zip | |
createOperations(): avoid elimination of ballpark transformation that can help for NAD83->WGS84->NAD83(2011) hops
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/coordinateoperation.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index e150bc15..6593d3e9 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -14340,8 +14340,9 @@ void CoordinateOperationFactory::Private::createOperationsBoundToGeog( for (const auto &opFirst : opsFirst) { for (const auto &opLast : opsLast) { // Exclude artificial transformations from the hub - // to the target CRS - if (!opLast->hasBallparkTransformation()) { + // to the target CRS, if it is the only one. + if (opsLast.size() > 1 || + !opLast->hasBallparkTransformation()) { try { res.emplace_back( ConcatenatedOperation::createComputeMetadata( @@ -14349,6 +14350,9 @@ void CoordinateOperationFactory::Private::createOperationsBoundToGeog( disallowEmptyIntersection)); } catch (const InvalidOperationEmptyIntersection &) { } + } else { + // std::cerr << "excluded " << opLast->nameStr() << + // std::endl; } } } @@ -14432,6 +14436,9 @@ void CoordinateOperationFactory::Private::createOperationsBoundToGeog( } catch ( const InvalidOperationEmptyIntersection &) { } + } else { + // std::cerr << "excluded " << opLast->nameStr() << + // std::endl; } } } @@ -15201,11 +15208,14 @@ void CoordinateOperationFactory::Private::createOperationsCompoundToCompound( createOperations(intermGeogSrc, intermGeogDst, context); for (const auto &op1 : opsSrcToGeog) { if (op1->hasBallparkTransformation()) { + // std::cerr << "excluded " << op1->nameStr() << std::endl; continue; } for (const auto &op2 : opsGeogSrcToGeogDst) { for (const auto &op3 : opsGeogToTarget) { if (op3->hasBallparkTransformation()) { + // std::cerr << "excluded " << op3->nameStr() << + // std::endl; continue; } try { |
