From ec49c9cd0aa9de24623920b8de226daf05a0e90f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 8 Aug 2019 19:18:26 +0200 Subject: projinfo: rename JSON to PROJJSON --- src/apps/projinfo.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/apps/projinfo.cpp') 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(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(); -- cgit v1.2.3