diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-08-08 19:18:26 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-08-09 13:22:25 +0200 |
| commit | ec49c9cd0aa9de24623920b8de226daf05a0e90f (patch) | |
| tree | a53902fc9134fb0790191b45e585b42f4e31d29a /src | |
| parent | d44e1e268c5da846455d3f73f94a283e80340b6c (diff) | |
| download | PROJ-ec49c9cd0aa9de24623920b8de226daf05a0e90f.tar.gz PROJ-ec49c9cd0aa9de24623920b8de226daf05a0e90f.zip | |
projinfo: rename JSON to PROJJSON
Diffstat (limited to 'src')
| -rw-r--r-- | src/apps/projinfo.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp index 6b1267e0..6cacdd66 100644 --- a/src/apps/projinfo.cpp +++ b/src/apps/projinfo.cpp @@ -67,7 +67,7 @@ struct OutputOptions { bool WKT2_2015_SIMPLIFIED = false; bool WKT1_GDAL = false; bool WKT1_ESRI = false; - bool JSON = false; + bool PROJJSON = false; bool c_ify = false; bool singleLine = false; bool strict = true; @@ -102,7 +102,7 @@ static void usage() { std::cerr << std::endl; std::cerr << "-o: formats is a comma separated combination of: " "all,default,PROJ,WKT_ALL,WKT2_2015,WKT2_2018,WKT1_GDAL," - "WKT1_ESRI,JSON" + "WKT1_ESRI,PROJJSON" << std::endl; std::cerr << " Except 'all' and 'default', other format can be preceded " "by '-' to disable them" @@ -474,20 +474,20 @@ static void outputObject( auto JSONExportable = nn_dynamic_pointer_cast<IJSONExportable>(obj); if (JSONExportable) { - if (outputOpt.JSON) { + if (outputOpt.PROJJSON) { try { if (alreadyOutputed) { std::cout << std::endl; } if (!outputOpt.quiet) { - std::cout << "JSON:" << std::endl; + std::cout << "PROJJSON:" << std::endl; } std::cout << JSONExportable->exportToJSON( JSONFormatter::create(dbContext).get()) << std::endl; } catch (const std::exception &e) { - std::cerr << "Error when exporting to JSON: " << e.what() + std::cerr << "Error when exporting to PROJJSON: " << e.what() << std::endl; } // alreadyOutputed = true; @@ -744,7 +744,7 @@ int main(int argc, char **argv) { outputOpt.WKT2_2015 = true; outputOpt.WKT1_GDAL = true; outputOpt.WKT1_ESRI = true; - outputOpt.JSON = true; + outputOpt.PROJJSON = true; } else if (ci_equal(format, "default")) { outputOpt.PROJ5 = true; outputOpt.WKT2_2018 = true; @@ -804,10 +804,10 @@ int main(int argc, char **argv) { ci_equal(format, "-WKT1-ESRI") || ci_equal(format, "-WKT1:ESRI")) { outputOpt.WKT1_ESRI = false; - } else if (ci_equal(format, "JSON")) { - outputOpt.JSON = true; - } else if (ci_equal(format, "-JSON")) { - outputOpt.JSON = false; + } else if (ci_equal(format, "PROJJSON")) { + outputOpt.PROJJSON = true; + } else if (ci_equal(format, "-PROJJSON")) { + outputOpt.PROJJSON = false; } else { std::cerr << "Unrecognized value for option -o: " << format << std::endl; @@ -1027,7 +1027,7 @@ int main(int argc, char **argv) { if (outputOpt.quiet && (outputOpt.PROJ5 + outputOpt.WKT2_2018 + outputOpt.WKT2_2015 + - outputOpt.WKT1_GDAL + outputOpt.JSON) != 1) { + outputOpt.WKT1_GDAL + outputOpt.PROJJSON) != 1) { std::cerr << "-q can only be used with a single output format" << std::endl; usage(); |
