[geos-commits] [SCM] GEOS branch main updated. 5e4f5981551ec79836ac25bda4fce0b707187fc0

git at osgeo.org git at osgeo.org
Tue Mar 24 09:21:55 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  5e4f5981551ec79836ac25bda4fce0b707187fc0 (commit)
       via  e5f11a9f5770ce2f537f0ab1962640077baf8d1a (commit)
       via  a9efb9e0676d4626a995d36d9163d487dbe75579 (commit)
       via  617ef6afe71fd4c7fccb6820b0b3b622a2885b09 (commit)
       via  6f19fd5cca6755766820b1422bc89dbafa08482f (commit)
       via  1dbed71afb3a52f255e939774dfd2c6e2df53302 (commit)
      from  77574b214701e0f2750b949e7f65cbdd49a4ce31 (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 5e4f5981551ec79836ac25bda4fce0b707187fc0
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Mar 24 12:01:36 2026 -0400

    OverlayGraph: Use CoordinateXY for nodeMap

diff --git a/include/geos/operation/overlayng/OverlayGraph.h b/include/geos/operation/overlayng/OverlayGraph.h
index 39dcbd15b..eda4d07ed 100644
--- a/include/geos/operation/overlayng/OverlayGraph.h
+++ b/include/geos/operation/overlayng/OverlayGraph.h
@@ -51,12 +51,13 @@ namespace overlayng { // geos.operation.overlayng
  */
 class GEOS_DLL OverlayGraph {
     using Coordinate = geos::geom::Coordinate;
+    using CoordinateXY = geos::geom::CoordinateXY;
     using CoordinateSequence = geos::geom::CoordinateSequence;
 
 private:
 
     // Members
-    std::unordered_map<Coordinate, OverlayEdge*, geom::Coordinate::HashCode> nodeMap;
+    std::unordered_map<CoordinateXY, OverlayEdge*, geom::Coordinate::HashCode> nodeMap;
     std::vector<OverlayEdge*> edges;
 
     // Locally store the OverlayEdge and OverlayLabel

commit e5f11a9f5770ce2f537f0ab1962640077baf8d1a
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Mar 24 12:01:13 2026 -0400

    OverlayEdge: Use CoordinateXY for direction point

diff --git a/include/geos/operation/overlayng/OverlayEdge.h b/include/geos/operation/overlayng/OverlayEdge.h
index 031e743a2..7ad5bdf9e 100644
--- a/include/geos/operation/overlayng/OverlayEdge.h
+++ b/include/geos/operation/overlayng/OverlayEdge.h
@@ -46,6 +46,7 @@ namespace overlayng { // geos.operation.overlayng
 */
 class GEOS_DLL OverlayEdge : public edgegraph::HalfEdge {
     using Coordinate = geos::geom::Coordinate;
+    using CoordinateXY = geos::geom::CoordinateXY;
     using CoordinateXYZM = geos::geom::CoordinateXYZM;
     using CoordinateSequence = geos::geom::CoordinateSequence;
     using Location = geos::geom::Location;
@@ -60,7 +61,7 @@ private:
     * The label must be interpreted accordingly.
     */
     bool direction;
-    CoordinateXYZM dirPt;
+    CoordinateXY dirPt;
     OverlayLabel* label;
     bool m_isInResultArea;
     bool m_isInResultLine;
@@ -78,7 +79,7 @@ private:
 
 public:
 
-    OverlayEdge(const CoordinateXYZM& p_orig, const CoordinateXYZM& p_dirPt,
+    OverlayEdge(const CoordinateXYZM& p_orig, const CoordinateXY& p_dirPt,
                 bool p_direction, OverlayLabel* p_label,
                 const std::shared_ptr<const CoordinateSequence>& p_pts)
         : HalfEdge(p_orig)
@@ -102,7 +103,7 @@ public:
         return direction;
     };
 
-    const CoordinateXYZM& directionPt() const override
+    const CoordinateXY& directionPt() const override
     {
         return dirPt;
     };

commit a9efb9e0676d4626a995d36d9163d487dbe75579
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Mar 24 11:56:50 2026 -0400

    HalfEdge: Use CoordinateXY for directionPt

diff --git a/include/geos/edgegraph/HalfEdge.h b/include/geos/edgegraph/HalfEdge.h
index 20662f7be..ad44b92f0 100644
--- a/include/geos/edgegraph/HalfEdge.h
+++ b/include/geos/edgegraph/HalfEdge.h
@@ -109,7 +109,7 @@ protected:
     *
     * @return the direction point for the edge
     */
-    virtual const geom::CoordinateXYZM& directionPt() const { return dest(); };
+    virtual const geom::CoordinateXY& directionPt() const { return dest(); };
 
 
 public:
diff --git a/src/edgegraph/HalfEdge.cpp b/src/edgegraph/HalfEdge.cpp
index 98f4b6759..54b5658e0 100644
--- a/src/edgegraph/HalfEdge.cpp
+++ b/src/edgegraph/HalfEdge.cpp
@@ -202,8 +202,8 @@ HalfEdge::compareAngularDirection(const HalfEdge* e) const
     * Check relative orientation of direction vectors
     * this is > e if it is CCW of e
     */
-    const Coordinate& dir1 = directionPt();
-    const Coordinate& dir2 = e->directionPt();
+    const CoordinateXY& dir1 = directionPt();
+    const CoordinateXY& dir2 = e->directionPt();
     return algorithm::Orientation::index(e->m_orig, dir2, dir1);
 }
 

commit 617ef6afe71fd4c7fccb6820b0b3b622a2885b09
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Mar 24 11:53:41 2026 -0400

    InputGeometry: avoid unnecessary 3D coord use

diff --git a/include/geos/operation/overlayng/InputGeometry.h b/include/geos/operation/overlayng/InputGeometry.h
index e1ff981e2..82532a093 100644
--- a/include/geos/operation/overlayng/InputGeometry.h
+++ b/include/geos/operation/overlayng/InputGeometry.h
@@ -42,6 +42,7 @@ class GEOS_DLL InputGeometry {
     using Geometry = geos::geom::Geometry;
     using Envelope = geos::geom::Envelope;
     using Coordinate = geos::geom::Coordinate;
+    using CoordinateXY = geos::geom::CoordinateXY;
     using Location = geos::geom::Location;
     using PointOnGeometryLocator = geos::algorithm::locate::PointOnGeometryLocator;
 
@@ -91,7 +92,7 @@ public:
     *
     * @see Location
     */
-    Location locatePointInArea(uint8_t geomIndex, const Coordinate& pt);
+    Location locatePointInArea(uint8_t geomIndex, const CoordinateXY& pt);
 
     PointOnGeometryLocator* getLocator(uint8_t geomIndex);
     void setCollapsed(uint8_t geomIndex, bool isGeomCollapsed);
diff --git a/src/operation/overlayng/InputGeometry.cpp b/src/operation/overlayng/InputGeometry.cpp
index dd350aa07..6c3c5a2ba 100644
--- a/src/operation/overlayng/InputGeometry.cpp
+++ b/src/operation/overlayng/InputGeometry.cpp
@@ -150,7 +150,7 @@ InputGeometry::hasEdges(uint8_t geomIndex) const
 */
 /*public*/
 Location
-InputGeometry::locatePointInArea(uint8_t geomIndex, const Coordinate& pt)
+InputGeometry::locatePointInArea(uint8_t geomIndex, const CoordinateXY& pt)
 {
     if (isCollapsed[geomIndex] || getGeometry(geomIndex)->isEmpty())
         return Location::EXTERIOR;

commit 6f19fd5cca6755766820b1422bc89dbafa08482f
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Mar 24 11:52:15 2026 -0400

    TopologyException: construct from 2D point

diff --git a/include/geos/util/TopologyException.h b/include/geos/util/TopologyException.h
index 49b9a81f5..1109b0eb1 100644
--- a/include/geos/util/TopologyException.h
+++ b/include/geos/util/TopologyException.h
@@ -43,6 +43,12 @@ public:
         GEOSException("TopologyException", msg)
     {}
 
+    TopologyException(const std::string& msg, const geom::CoordinateXY& newPt)
+        :
+        GEOSException("TopologyException", msg + " at " + newPt.toString()),
+        pt(newPt)
+    {}
+
     TopologyException(const std::string& msg, const geom::Coordinate& newPt)
         :
         GEOSException("TopologyException", msg + " at " + newPt.toString()),

commit 1dbed71afb3a52f255e939774dfd2c6e2df53302
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Mar 24 10:38:38 2026 -0400

    Edge: Use CoordinateXY where possible

diff --git a/include/geos/operation/overlayng/Edge.h b/include/geos/operation/overlayng/Edge.h
index 4ed90968c..2af2a0c67 100644
--- a/include/geos/operation/overlayng/Edge.h
+++ b/include/geos/operation/overlayng/Edge.h
@@ -17,7 +17,6 @@
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/Dimension.h>
-#include <geos/operation/overlayng/OverlayEdge.h>
 #include <geos/operation/overlayng/OverlayLabel.h>
 #include <geos/operation/overlayng/EdgeSourceInfo.h>
 #include <geos/util/GEOSException.h>
@@ -220,7 +219,7 @@ public:
         return cs;
     };
 
-    const geom::Coordinate& getCoordinate(std::size_t index)  const
+    const geom::CoordinateXY& getCoordinate(std::size_t index)  const
     {
         return pts->getAt(index);
     };
@@ -310,8 +309,8 @@ public:
 
     bool compareTo(const Edge& e) const
     {
-        const geom::Coordinate& ca = getCoordinate(0);
-        const geom::Coordinate& cb = e.getCoordinate(0);
+        const geom::CoordinateXY& ca = getCoordinate(0);
+        const geom::CoordinateXY& cb = e.getCoordinate(0);
         if(ca.compareTo(cb) < 0) {
             return true;
         }
@@ -319,8 +318,8 @@ public:
             return false;
         }
         else {
-            const geom::Coordinate& cca = getCoordinate(1);
-            const geom::Coordinate& ccb = e.getCoordinate(1);
+            const geom::CoordinateXY& cca = getCoordinate(1);
+            const geom::CoordinateXY& ccb = e.getCoordinate(1);
             if(cca.compareTo(ccb) < 0) {
                 return true;
             }
diff --git a/include/geos/operation/overlayng/EdgeKey.h b/include/geos/operation/overlayng/EdgeKey.h
index ef66e4653..a7f440564 100644
--- a/include/geos/operation/overlayng/EdgeKey.h
+++ b/include/geos/operation/overlayng/EdgeKey.h
@@ -61,7 +61,7 @@ private:
         }
     }
 
-    void init(const geom::Coordinate& p0, const geom::Coordinate& p1)
+    void init(const geom::CoordinateXY& p0, const geom::CoordinateXY& p1)
     {
         p0x = p0.x;
         p0y = p0.y;

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

Summary of changes:
 include/geos/edgegraph/HalfEdge.h                |  2 +-
 include/geos/operation/overlayng/Edge.h          | 11 +++++------
 include/geos/operation/overlayng/EdgeKey.h       |  2 +-
 include/geos/operation/overlayng/InputGeometry.h |  3 ++-
 include/geos/operation/overlayng/OverlayEdge.h   |  7 ++++---
 include/geos/operation/overlayng/OverlayGraph.h  |  3 ++-
 include/geos/util/TopologyException.h            |  6 ++++++
 src/edgegraph/HalfEdge.cpp                       |  4 ++--
 src/operation/overlayng/InputGeometry.cpp        |  2 +-
 9 files changed, 24 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list