aboutsummaryrefslogtreecommitdiff
path: root/src/apps/projinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/apps/projinfo.cpp')
-rw-r--r--src/apps/projinfo.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp
index 966de03d..f36674fd 100644
--- a/src/apps/projinfo.cpp
+++ b/src/apps/projinfo.cpp
@@ -350,11 +350,10 @@ static void outputObject(
objToExport = projStringExportable;
}
- std::cout << objToExport->exportToPROJString(
- PROJStringFormatter::create(
- PROJStringFormatter::Convention::PROJ_5,
- dbContext)
- .get())
+ auto formatter = PROJStringFormatter::create(
+ PROJStringFormatter::Convention::PROJ_5, dbContext);
+ formatter->setMultiLine(!outputOpt.singleLine);
+ std::cout << objToExport->exportToPROJString(formatter.get())
<< std::endl;
} catch (const std::exception &e) {
std::cerr << "Error when exporting to PROJ string: " << e.what()
@@ -376,9 +375,7 @@ static void outputObject(
}
auto formatter =
WKTFormatter::create(WKTFormatter::Convention::WKT2_2015);
- if (outputOpt.singleLine) {
- formatter->setMultiLine(false);
- }
+ formatter->setMultiLine(!outputOpt.singleLine);
formatter->setStrict(outputOpt.strict);
auto wkt = wktExportable->exportToWKT(formatter.get());
if (outputOpt.c_ify) {