diff options
Diffstat (limited to 'src/iso19111/io.cpp')
| -rw-r--r-- | src/iso19111/io.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 678c5d98..d994277b 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -6284,6 +6284,15 @@ struct Step { }; std::vector<KeyValue> paramValues{}; + + bool hasKey(const char *keyName) const { + for (const auto &kv : paramValues) { + if (kv.key == keyName) { + return true; + } + } + return false; + } }; Step::KeyValue::KeyValue(const char *keyIn, const std::string &valueIn) @@ -6813,7 +6822,9 @@ const std::string &PROJStringFormatter::toString() const { if (d->steps_.size() > 1 || (d->steps_.size() == 1 && - (d->steps_.front().inverted || !d->globalParamValues_.empty()))) { + (d->steps_.front().inverted || d->steps_.front().hasKey("omit_inv") || + d->steps_.front().hasKey("omit_fwd") || + !d->globalParamValues_.empty()))) { d->appendToResult("+proj=pipeline"); for (const auto ¶mValue : d->globalParamValues_) { |
