Skip to content

Commit

Permalink
exportToPROJString(): when a NADCON operation is included in a vertic…
Browse files Browse the repository at this point in the history
…al transformation, do not include axis swap
  • Loading branch information
rouault committed Jul 11, 2023
1 parent 0550d6b commit 425c3ca
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/iso19111/operation/singleoperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3730,9 +3730,11 @@ bool SingleOperation::exportToPROJStringGeneric(
concat("Can apply ", methodName, " only to GeographicCRS"));
}

formatter->startInversion();
sourceCRSGeog->addAngularUnitConvertAndAxisSwap(formatter);
formatter->stopInversion();
if (!formatter->omitHorizontalConversionInVertTransformation()) {
formatter->startInversion();
sourceCRSGeog->addAngularUnitConvertAndAxisSwap(formatter);
formatter->stopInversion();
}

if (isMethodInverseOf) {
formatter->startInversion();
Expand All @@ -3753,7 +3755,9 @@ bool SingleOperation::exportToPROJStringGeneric(
formatter->stopInversion();
}

targetCRSGeog->addAngularUnitConvertAndAxisSwap(formatter);
if (!formatter->omitHorizontalConversionInVertTransformation()) {
targetCRSGeog->addAngularUnitConvertAndAxisSwap(formatter);
}

return true;
}
Expand Down

0 comments on commit 425c3ca

Please sign in to comment.