diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-03-25 20:51:56 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-03-25 20:51:56 +0100 |
| commit | 399ebef6a66e57d389a7b7761e7373a4cebe86e5 (patch) | |
| tree | 5c7facee6ee57cb471d149ac89a6bb2e1fb5daeb /src/iso19111/coordinateoperation.cpp | |
| parent | 66774791d16d1b197911e595aaaceb9690c8ca14 (diff) | |
| download | PROJ-399ebef6a66e57d389a7b7761e7373a4cebe86e5.tar.gz PROJ-399ebef6a66e57d389a7b7761e7373a4cebe86e5.zip | |
lookForGridInfo(): correctly return that a grid is present, if present on the file system, but not in the database
Diffstat (limited to 'src/iso19111/coordinateoperation.cpp')
| -rw-r--r-- | src/iso19111/coordinateoperation.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index 80c1a572..a8a25a6a 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -8742,13 +8742,25 @@ void Transformation::_exportToPROJString( if (fileParameter && fileParameter->type() == ParameterValue::Type::FILENAME) { auto filename = fileParameter->valueFile(); - if (isMethodInverseOf) { + bool doInversion = isMethodInverseOf; + if (!identifiers().empty() && + *identifiers().front()->codeSpace() == + metadata::Identifier::EPSG && + method()->nameStr() == + "Geographic3D to GravityRelatedHeight (US .gtx)" && + ends_with(filename, ".gtx")) { + // gtx files, from straight EPSG definition, must be applied in + // reverse order for "Geographic3D to GravityRelatedHeight" + // method + doInversion = !doInversion; + } + if (doInversion) { formatter->startInversion(); } formatter->addStep("vgridshift"); formatter->addParam("grids", filename); formatter->addParam("multiplier", 1.0); - if (isMethodInverseOf) { + if (doInversion) { formatter->stopInversion(); } return; |
