diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-27 18:14:56 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-01-27 18:45:07 +0100 |
| commit | ea6245ea32f0b0ee414c22951b1f5dc4048782de (patch) | |
| tree | 65b0e20d6a42840384b9aab01f0667f79fbfa582 /src/apps | |
| parent | a4c5cc1e42559f1d92c6b7655680d11f1eead703 (diff) | |
| download | PROJ-ea6245ea32f0b0ee414c22951b1f5dc4048782de.tar.gz PROJ-ea6245ea32f0b0ee414c22951b1f5dc4048782de.zip | |
projinfo: add --searchpaths switch
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 27ea278a..360aafc4 100644 --- a/src/apps/projinfo.cpp +++ b/src/apps/projinfo.cpp @@ -98,7 +98,8 @@ static void usage() { << std::endl << " [--identify] [--3d]" << std::endl << " [--c-ify] [--single-line]" << std::endl - << " {object_definition} | (-s {srs_def} -t {srs_def})" + << " --searchpaths | {object_definition} | (-s " + "{srs_def} -t {srs_def})" << std::endl; std::cerr << std::endl; std::cerr << "-o: formats is a comma separated combination of: " @@ -1057,6 +1058,17 @@ int main(int argc, char **argv) { outputOpt.strict = false; } else if (ci_equal(arg, "--3d")) { promoteTo3D = true; + } else if (ci_equal(arg, "--searchpaths")) { +#ifdef _WIN32 + constexpr char delim = ';'; +#else + constexpr char delim = ':'; +#endif + const auto paths = split(proj_info().searchpath, delim); + for (const auto &path : paths) { + std::cout << path << std::endl; + } + std::exit(0); } else if (arg == "-?" || arg == "--help") { usage(); } else if (arg[0] == '-') { |
