aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-10-16 00:21:43 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-10-16 18:49:58 +0200
commitd981e01e3f4de4f582ac2442c5c1987650e86877 (patch)
tree7031832b5f67b0afc27c8b132b79770b1ee54320
parent53e716f80f1e08642013714aceb4f7a210ed5306 (diff)
downloadPROJ-d981e01e3f4de4f582ac2442c5c1987650e86877.tar.gz
PROJ-d981e01e3f4de4f582ac2442c5c1987650e86877.zip
projinfo: restrict PROJ multiline output to coordinate operations only
-rw-r--r--src/apps/projinfo.cpp3
-rw-r--r--test/cli/testprojinfo_out.dist6
2 files changed, 4 insertions, 5 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp
index f36674fd..ee48a69c 100644
--- a/src/apps/projinfo.cpp
+++ b/src/apps/projinfo.cpp
@@ -352,7 +352,8 @@ static void outputObject(
auto formatter = PROJStringFormatter::create(
PROJStringFormatter::Convention::PROJ_5, dbContext);
- formatter->setMultiLine(!outputOpt.singleLine);
+ formatter->setMultiLine(!outputOpt.singleLine &&
+ crs == nullptr);
std::cout << objToExport->exportToPROJString(formatter.get())
<< std::endl;
} catch (const std::exception &e) {
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 32d7d9be..b4d19002 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -844,8 +844,7 @@ Alternative non-deprecated CRS:
EPSG:3003
PROJ.4 string:
-+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +pm=rome
- +units=m +no_defs +type=crs
++proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs +type=crs
WKT2:2019 string:
PROJCRS["Monte Mario (Rome) / Italy zone 1",
@@ -914,8 +913,7 @@ GEOGCRS["WGS 84",
Testing CRS with towgs84: projinfo -o PROJ EPSG:25832
PROJ.4 string:
-+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
- +type=crs
++proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs
Testing RH2000 height to SWEREF99: projinfo -s EPSG:5613 -t EPSG:4977
Candidate operations found: 1