[geos-commits] [SCM] GEOS branch 3.9 updated. cddd943b262668db8dfdc98a2360f54089af98dc
git at osgeo.org
git at osgeo.org
Mon May 15 04:04:09 PDT 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, 3.9 has been updated
via cddd943b262668db8dfdc98a2360f54089af98dc (commit)
from 06121058980f129c4171a731e3b4a5f59816492e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cddd943b262668db8dfdc98a2360f54089af98dc
Author: Mike Taves <mwtoews at gmail.com>
Date: Mon May 15 22:48:15 2023 +1200
geosop: change output to show Z
diff --git a/util/geosop/GeosOp.cpp b/util/geosop/GeosOp.cpp
index 9cecbd24e..d2960aebe 100644
--- a/util/geosop/GeosOp.cpp
+++ b/util/geosop/GeosOp.cpp
@@ -21,6 +21,7 @@
#include <geos/io/WKTReader.h>
#include <geos/io/WKTWriter.h>
#include <geos/io/WKBReader.h>
+#include <geos/io/WKBWriter.h>
#include <fstream>
#include <iostream>
@@ -474,16 +475,23 @@ void GeosOp::outputGeometry(const Geometry * geom) {
}
if (args.format == GeosOpArgs::fmtWKB ) {
- std::cout << *(geom) << std::endl;
+ // output as hex-encoded WKB
+ WKBWriter writer;
+ writer.setOutputDimension(3);
+ writer.writeHEX(*geom, std::cout);
+ std::cout << std::endl;
}
else {
// output as text/WKT
WKTWriter writer;
- // turn off stoopid fixed precision
- writer.setTrim(true);
+ writer.setOutputDimension(3);
if (args.precision >= 0) {
writer.setRoundingPrecision(args.precision);
}
+ else {
+ // turn off stoopid fixed precision
+ writer.setTrim(true);
+ }
std::cout << writer.write(geom) << std::endl;
}
}
-----------------------------------------------------------------------
Summary of changes:
util/geosop/GeosOp.cpp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list