diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-04-04 19:27:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-04 19:27:26 +0200 |
| commit | 0ff11909243616f4b8f58ae449e05685e59a73e4 (patch) | |
| tree | 66055fd783a6f9ae5d6bbca623849c7517a5d391 /src/apps | |
| parent | 1f792e6b9c9b41c4da8f8996e3eb325e444b0099 (diff) | |
| parent | 335d9367fd07ebe5da50d2f9e336d5d8f6e31aee (diff) | |
| download | PROJ-0ff11909243616f4b8f58ae449e05685e59a73e4.tar.gz PROJ-0ff11909243616f4b8f58ae449e05685e59a73e4.zip | |
Merge pull request #2127 from rouault/projinfo_hide_ballpark
projinfo: add a --hide-ballpark option
Diffstat (limited to 'src/apps')
| -rw-r--r-- | src/apps/projinfo.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp index 1e58cfb0..10ce346f 100644 --- a/src/apps/projinfo.cpp +++ b/src/apps/projinfo.cpp @@ -71,6 +71,7 @@ struct OutputOptions { bool c_ify = false; bool singleLine = false; bool strict = true; + bool ballparkAllowed = true; }; } // anonymous namespace @@ -89,10 +90,10 @@ static void usage() { << std::endl << " [--grid-check " "none|discard_missing|sort|known_available] " - "[--show-superseded]" << std::endl << " [--pivot-crs always|if_no_direct_transformation|" << "never|{auth:code[,auth:code]*}]" << std::endl + << " [--show-superseded] [--hide-ballpark]" << std::endl << " [--boundcrs-to-wgs84]" << std::endl << " [--main-db-path path] [--aux-db-path path]*" << std::endl @@ -725,6 +726,15 @@ static void outputOperations( << std::endl; std::exit(1); } + if (!outputOpt.ballparkAllowed) { + std::vector<CoordinateOperationNNPtr> listNew; + for (const auto &op : list) { + if (!op->hasBallparkTransformation()) { + listNew.emplace_back(op); + } + } + list = std::move(listNew); + } if (outputOpt.quiet && !list.empty()) { outputObject(dbContext, list[0], allowUseIntermediateCRS, outputOpt); return; @@ -1053,6 +1063,8 @@ int main(int argc, char **argv) { showSuperseded = true; } else if (arg == "--lax") { outputOpt.strict = false; + } else if (arg == "--hide-ballpark") { + outputOpt.ballparkAllowed = false; } else if (ci_equal(arg, "--3d")) { promoteTo3D = true; } else if (ci_equal(arg, "--searchpaths")) { |
