diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-04-04 11:27:59 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-04-04 11:27:59 +0200 |
| commit | 99a2d5f248b828ff97121b0137569a0094b5c63e (patch) | |
| tree | 1972a76299ee5dd2feea508106b38e247638dd23 /src/apps | |
| parent | 670eab68f2345b2a77bfac8a109588770bceb740 (diff) | |
| download | PROJ-99a2d5f248b828ff97121b0137569a0094b5c63e.tar.gz PROJ-99a2d5f248b828ff97121b0137569a0094b5c63e.zip | |
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")) { |
