[geos-commits] [SCM] GEOS branch main updated. cc58aad27d8e8d13fcfcfab00b1305944c6833e7
git at osgeo.org
git at osgeo.org
Wed Jun 17 14:04:31 PDT 2026
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, main has been updated
via cc58aad27d8e8d13fcfcfab00b1305944c6833e7 (commit)
from 4150b856e18b4f33460dbe12b23eea449af8095b (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 cc58aad27d8e8d13fcfcfab00b1305944c6833e7
Author: Kurt Schwehr <schwehr at gmail.com>
Date: Wed Jun 17 14:04:09 2026 -0700
Fix `size_t <<` debug prints (#1452)
Bug introduced in https://github.com/libgeos/geos/commit/d271aaa9a1939fe5a51c5b5d05f1a3d547a2f900
diff --git a/src/io/WKBReader.cpp b/src/io/WKBReader.cpp
index b366d91b9..3562e0147 100644
--- a/src/io/WKBReader.cpp
+++ b/src/io/WKBReader.cpp
@@ -46,6 +46,9 @@
//#define DEBUG_WKB_READER 1
+#if DEBUG_WKB_READER
+#include <iostream>
+#endif
using namespace geos::geom;
@@ -174,7 +177,7 @@ WKBReader::readHEX(std::istream& is)
static_cast<unsigned char>((result_high << 4) + result_low);
#if DEBUG_HEX_READER
- std::size_t << "HEX " << high << low << " -> DEC " << (int)value << std::endl;
+ std::cout << "HEX " << high << low << " -> DEC " << (int)value << std::endl;
#endif
// write the value to the output stream
os << value;
@@ -272,7 +275,7 @@ WKBReader::readGeometry()
unsigned char byteOrder = dis.readByte();
#if DEBUG_WKB_READER
- std::size_t << "WKB byteOrder: " << (int)byteOrder << std::endl;
+ std::cout << "WKB byteOrder: " << (int)byteOrder << std::endl;
#endif
// default is machine endian
@@ -295,7 +298,7 @@ WKBReader::readGeometry()
int sfsqlHasM = (typeInt & 0x40000000) != 0;
#if DEBUG_WKB_READER
- std::size_t << "WKB geometryType: " << geometryType << std::endl;
+ std::cout << "WKB geometryType: " << geometryType << std::endl;
#endif
hasZ = sfsqlHasZ || isoHasZ;
@@ -311,17 +314,17 @@ WKBReader::readGeometry()
}
#if DEBUG_WKB_READER
- std::size_t << "WKB hasZ: " << hasZ << std::endl;
+ std::cout << "WKB hasZ: " << hasZ << std::endl;
#endif
#if DEBUG_WKB_READER
- std::size_t << "WKB dimensions: " << inputDimension << std::endl;
+ std::cout << "WKB dimensions: " << inputDimension << std::endl;
#endif
bool hasSRID = ((typeInt & 0x20000000) != 0);
#if DEBUG_WKB_READER
- std::size_t << "WKB hasSRID: " << hasSRID << std::endl;
+ std::cout << "WKB hasSRID: " << hasSRID << std::endl;
#endif
int SRID = 0;
@@ -398,7 +401,7 @@ WKBReader::readLineString()
uint32_t size = dis.readUnsigned();
minMemSize(GEOS_LINESTRING, size);
#if DEBUG_WKB_READER
- std::size_t << "WKB npoints: " << size << std::endl;
+ std::cout << "WKB npoints: " << size << std::endl;
#endif
auto pts = readCoordinateSequence(size);
return factory.createLineString(std::move(pts));
@@ -410,7 +413,7 @@ WKBReader::readLinearRing()
uint32_t size = dis.readUnsigned();
minMemSize(GEOS_LINEARRING, size);
#if DEBUG_WKB_READER
- std::size_t << "WKB npoints: " << size << std::endl;
+ std::cout << "WKB npoints: " << size << std::endl;
#endif
auto pts = readCoordinateSequence(size);
// Replace unclosed ring with closed
@@ -451,7 +454,7 @@ WKBReader::readPolygon()
minMemSize(GEOS_POLYGON, numRings);
#if DEBUG_WKB_READER
- std::size_t << "WKB numRings: " << numRings << std::endl;
+ std::cout << "WKB numRings: " << numRings << std::endl;
#endif
std::unique_ptr<LinearRing> shell;
@@ -481,7 +484,7 @@ WKBReader::readCurvePolygon()
minMemSize(GEOS_POLYGON, numRings);
#if DEBUG_WKB_READER
- std::size_t << "WKB numRings: " << numRings << std::endl;
+ std::cout << "WKB numRings: " << numRings << std::endl;
#endif
if (numRings == 0) {
@@ -624,7 +627,7 @@ WKBReader::readCoordinate()
}
}
#if DEBUG_WKB_READER
- std::size_t << "WKB coordinate: " << ordValues[0] << "," << ordValues[1] << std::endl;
+ std::cout << "WKB coordinate: " << ordValues[0] << "," << ordValues[1] << std::endl;
#endif
}
diff --git a/src/io/WKBWriter.cpp b/src/io/WKBWriter.cpp
index f7c83d38d..95c64b044 100644
--- a/src/io/WKBWriter.cpp
+++ b/src/io/WKBWriter.cpp
@@ -42,6 +42,10 @@
#undef DEBUG_WKB_WRITER
+#if DEBUG_WKB_READER
+#include <iostream>
+#endif
+
using namespace geos::geom;
@@ -380,7 +384,7 @@ void
WKBWriter::writeCoordinate(const CoordinateSequence& cs, std::size_t idx)
{
#if DEBUG_WKB_WRITER
- std::size_t << "writeCoordinate: X:" << cs.getX(idx) << " Y:" << cs.getY(idx) << std::endl;
+ std::cout << "writeCoordinate: X:" << cs.getX(idx) << " Y:" << cs.getY(idx) << std::endl;
#endif
assert(outStream);
@@ -442,4 +446,3 @@ WKBWriter::getWkbType(const Geometry& g) {
} // namespace geos.io
} // namespace geos
-
diff --git a/src/operation/overlay/snap/GeometrySnapper.cpp b/src/operation/overlay/snap/GeometrySnapper.cpp
index c0b429739..a9a4722e6 100644
--- a/src/operation/overlay/snap/GeometrySnapper.cpp
+++ b/src/operation/overlay/snap/GeometrySnapper.cpp
@@ -209,8 +209,8 @@ GeometrySnapper::snap(const geom::Geometry& g0,
GeometrySnapper snapper1(g1);
snapGeom.second = snapper1.snapTo(*snapGeom.first, snapTolerance);
-// std::size_t << *snapGeom.first << std::endl;
-// std::size_t << *snapGeom.second << std::endl;
+// std::cout << *snapGeom.first << std::endl;
+// std::cout << *snapGeom.second << std::endl;
}
@@ -228,4 +228,3 @@ GeometrySnapper::snapToSelf(const geom::Geometry& g,
} // namespace geos.operation.overlay
} // namespace geos.operation
} // namespace geos
-
-----------------------------------------------------------------------
Summary of changes:
src/io/WKBReader.cpp | 25 ++++++++++++++-----------
src/io/WKBWriter.cpp | 7 +++++--
src/operation/overlay/snap/GeometrySnapper.cpp | 5 ++---
3 files changed, 21 insertions(+), 16 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list