[geos-commits] [SCM] GEOS branch 3.14 updated. 70f292941d2e2243f2db66cf1292bfcffcc001fb

git at osgeo.org git at osgeo.org
Fri Jun 19 15:21:34 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, 3.14 has been updated
       via  70f292941d2e2243f2db66cf1292bfcffcc001fb (commit)
       via  64e97b299d3f08160debd796c629fd7075b57892 (commit)
       via  b7ec1cbad96d0f518badeac697da4ab3381a86da (commit)
      from  a80d3c2da06305ce5d6cf03b882c2809c5ee43ab (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 70f292941d2e2243f2db66cf1292bfcffcc001fb
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Jun 18 12:49:34 2026 -0400

    KdTree: Disable optimizations in latest MSVC version
    
    References #1449

diff --git a/src/index/kdtree/KdTree.cpp b/src/index/kdtree/KdTree.cpp
index a0c2dfbff..9142a0789 100644
--- a/src/index/kdtree/KdTree.cpp
+++ b/src/index/kdtree/KdTree.cpp
@@ -226,6 +226,11 @@ KdTree::queryNode(KdNode* currentNode, const geom::Envelope& queryEnv, bool odd,
     }
 }
 
+#if defined(_MSC_VER) && _MSC_FULL_VER > 195035734
+// Avoid segfault with MSVC 19.51.36246.0
+// See https://github.com/libgeos/geos/issues/1449
+#pragma optimize("", off)
+#endif
 /*private*/
 KdNode*
 KdTree::queryNodePoint(KdNode* currentNode, const geom::Coordinate& queryPt, bool odd)
@@ -257,7 +262,9 @@ KdTree::queryNodePoint(KdNode* currentNode, const geom::Coordinate& queryPt, boo
     }
     return nullptr;
 }
-
+#if defined(_MSC_VER) && _MSC_FULL_VER > 195035734
+#pragma optimize("", on)
+#endif
 
 /*public*/
 void

commit 64e97b299d3f08160debd796c629fd7075b57892
Author: Daniel Baston <dbaston at gmail.com>
Date:   Fri Jun 19 09:24:45 2026 -0400

    KdTree: Add minimal test for #1449

diff --git a/tests/unit/index/kdtree/KdTreeTest.cpp b/tests/unit/index/kdtree/KdTreeTest.cpp
index 2de94f162..1121ca25b 100644
--- a/tests/unit/index/kdtree/KdTreeTest.cpp
+++ b/tests/unit/index/kdtree/KdTreeTest.cpp
@@ -189,6 +189,24 @@ void object::test<8> ()
     ensure(node->isRepeated());
 }
 
+template<>
+template<>
+void object::test<9>()
+{
+    set_test_name("query by point");
+    // minimal test for https://github.com/libgeos/geos/issues/1449
+
+    KdTree index;
+    ensure(index.query({ 6, 8 }) == nullptr);
+
+    const KdNode* node68 = index.insert({ 6, 8 });
+    ensure(node68);
+    ensure_equals(index.query({ 6, 8 }), node68);
+
+    const KdNode* node28 = index.insert({ 2, 8 });
+    ensure(node28);
+    ensure_equals(index.query({ 2, 8 }), node28);
+}
 
 
 

commit b7ec1cbad96d0f518badeac697da4ab3381a86da
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 442d28506..0016e6328 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;
@@ -265,7 +268,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
@@ -288,7 +291,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;
@@ -304,17 +307,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;
@@ -391,7 +394,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));
@@ -403,7 +406,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
@@ -444,7 +447,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;
@@ -474,7 +477,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) {
@@ -617,7 +620,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 a2aed6eaa..294c2f93d 100644
--- a/src/operation/overlay/snap/GeometrySnapper.cpp
+++ b/src/operation/overlay/snap/GeometrySnapper.cpp
@@ -203,8 +203,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;
 
 }
 
@@ -222,4 +222,3 @@ GeometrySnapper::snapToSelf(const geom::Geometry& g,
 } // namespace geos.operation.overlay
 } // namespace geos.operation
 } // namespace geos
-

-----------------------------------------------------------------------

Summary of changes:
 src/index/kdtree/KdTree.cpp                    |  9 ++++++++-
 src/io/WKBReader.cpp                           | 25 ++++++++++++++-----------
 src/io/WKBWriter.cpp                           |  7 +++++--
 src/operation/overlay/snap/GeometrySnapper.cpp |  5 ++---
 tests/unit/index/kdtree/KdTreeTest.cpp         | 18 ++++++++++++++++++
 5 files changed, 47 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list