aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apps/projinfo.cpp22
-rw-r--r--test/cli/testprojinfo_out.dist2
-rwxr-xr-xtravis/install.sh2
3 files changed, 13 insertions, 13 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();
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 20ae544a..530a0426 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -135,7 +135,7 @@ WKT1_ESRI:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
-JSON:
+PROJJSON:
{
"type": "GeographicCRS",
"name": "WGS 84",
diff --git a/travis/install.sh b/travis/install.sh
index bc6100da..7a31e5c2 100755
--- a/travis/install.sh
+++ b/travis/install.sh
@@ -52,7 +52,7 @@ make check
make install
find /tmp/proj_autoconf_install_from_dist_all
-/tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:32631 -o JSON -q > out.json
+/tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:32631 -o PROJJSON -q > out.json
cat out.json
echo "Validating JSON"
jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/crsjson.schema.json && echo "Valid !"