[geos-commits] [SCM] GEOS branch master updated. bab2a01a744b5bb300fa7276012cda29a0570f33

git at osgeo.org git at osgeo.org
Thu Feb 18 12:04:35 PST 2021


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, master has been updated
       via  bab2a01a744b5bb300fa7276012cda29a0570f33 (commit)
       via  684cc92bf52e7d9a13cf25e6ea1b8e25348c9155 (commit)
       via  8dd8a2d8f49b065f584bde0320d9f47f74b64b1f (commit)
       via  3320d96a88a1d8492016c37f23983de164470670 (commit)
       via  9dd8cb32d257fc1726e108680878d0a5c7b6b48a (commit)
      from  8399e3495503b940f176f084e51b7bf1ddb54ad4 (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 bab2a01a744b5bb300fa7276012cda29a0570f33
Merge: 8399e34 684cc92
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Feb 18 15:04:14 2021 -0500

    Merge branch 'overlayng-tweaks'


commit 684cc92bf52e7d9a13cf25e6ea1b8e25348c9155
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sun Feb 14 18:50:36 2021 -0500

    Remove redundant check in Octant

diff --git a/src/noding/Octant.cpp b/src/noding/Octant.cpp
index da1ce4c..89bd95d 100644
--- a/src/noding/Octant.cpp
+++ b/src/noding/Octant.cpp
@@ -88,12 +88,6 @@ Octant::octant(const Coordinate& p0, const Coordinate& p1)
     double dx = p1.x - p0.x;
     double dy = p1.y - p0.y;
 
-    if(dx == 0.0 && dy == 0.0) {
-        std::ostringstream s;
-        s << "Cannot compute the octant for " << "two identical points " << p0.toString();
-        throw util::IllegalArgumentException(s.str());
-    }
-
     return octant(dx, dy);
 }
 

commit 8dd8a2d8f49b065f584bde0320d9f47f74b64b1f
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sun Feb 14 18:20:57 2021 -0500

    Inline EdgeKey constructor

diff --git a/include/geos/operation/overlayng/EdgeKey.inl b/include/geos/operation/overlayng/EdgeKey.inl
index 11a3010..436f584 100644
--- a/include/geos/operation/overlayng/EdgeKey.inl
+++ b/include/geos/operation/overlayng/EdgeKey.inl
@@ -22,6 +22,12 @@ namespace geos {
 namespace operation {
 namespace overlayng {
 
+INLINE
+EdgeKey::EdgeKey(const Edge* edge)
+{
+    initPoints(edge);
+}
+
 /*private*/
 INLINE void
 EdgeKey::initPoints(const Edge* edge)
diff --git a/src/operation/overlayng/EdgeKey.cpp b/src/operation/overlayng/EdgeKey.cpp
index ebc9d58..17b3530 100644
--- a/src/operation/overlayng/EdgeKey.cpp
+++ b/src/operation/overlayng/EdgeKey.cpp
@@ -19,11 +19,6 @@ namespace geos {      // geos
 namespace operation { // geos.operation
 namespace overlayng { // geos.operation.overlayng
 
-EdgeKey::EdgeKey(const Edge* edge)
-{
-    initPoints(edge);
-}
-
 } // namespace geos.operation.overlayng
 } // namespace geos.operation
 } // namespace geos

commit 3320d96a88a1d8492016c37f23983de164470670
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sun Feb 14 15:30:32 2021 -0500

    Use unordered_map in OverlayGraph

diff --git a/include/geos/operation/overlayng/OverlayGraph.h b/include/geos/operation/overlayng/OverlayGraph.h
index 4e56a13..718390f 100644
--- a/include/geos/operation/overlayng/OverlayGraph.h
+++ b/include/geos/operation/overlayng/OverlayGraph.h
@@ -15,18 +15,18 @@
 #pragma once
 
 #include <geos/export.h>
+#include <geos/geom/Coordinate.h>
 #include <geos/operation/overlayng/OverlayEdge.h>
 #include <geos/operation/overlayng/OverlayLabel.h>
 #include <geos/geom/CoordinateSequence.h>
 
-#include <map>
+#include <unordered_map>
 #include <vector>
 #include <deque>
 
 // Forward declarations
 namespace geos {
 namespace geom {
-class Coordinate;
 }
 namespace operation {
 namespace overlayng {
@@ -56,7 +56,7 @@ class GEOS_DLL OverlayGraph {
 private:
 
     // Members
-    std::map<Coordinate, OverlayEdge*> nodeMap;
+    std::unordered_map<Coordinate, OverlayEdge*, geom::Coordinate::HashCode> nodeMap;
     std::vector<OverlayEdge*> edges;
 
     // Locally store the OverlayEdge and OverlayLabel
diff --git a/tests/unit/capi/GEOSIntersectionPrecTest.cpp b/tests/unit/capi/GEOSIntersectionPrecTest.cpp
index 6b1d243..135bf44 100644
--- a/tests/unit/capi/GEOSIntersectionPrecTest.cpp
+++ b/tests/unit/capi/GEOSIntersectionPrecTest.cpp
@@ -175,7 +175,8 @@ void object::test<8>
 
     geom3_ = GEOSIntersectionPrec(geom1_, geom2_, 2);
     ensure(nullptr != geom3_);
-    ensure_equals(toWKT(geom3_), std::string("GEOMETRYCOLLECTION (LINESTRING (2 0, 4 0), POINT (0 0), POINT (10 0))"));
+
+    ensure_geometry_equals(geom3_, "GEOMETRYCOLLECTION (LINESTRING (2 0, 4 0), POINT (0 0), POINT (10 0))");
 }
 
 } // namespace tut

commit 9dd8cb32d257fc1726e108680878d0a5c7b6b48a
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sun Feb 14 15:29:37 2021 -0500

    Avoid ElevationModel calcs for 2D geometries

diff --git a/src/operation/overlayng/ElevationModel.cpp b/src/operation/overlayng/ElevationModel.cpp
index 250a7e1..1af588b 100644
--- a/src/operation/overlayng/ElevationModel.cpp
+++ b/src/operation/overlayng/ElevationModel.cpp
@@ -112,12 +112,10 @@ ElevationModel::add(const Geometry& geom)
 
         void filter_ro(const geom::CoordinateSequence& seq, std::size_t i) override
         {
-#if 0
             if (! seq.hasZ()) {
                 hasZ = false;;
                 return;
             }
-#endif
             const Coordinate& c = seq.getAt(i);
 #if GEOS_DEBUG
             std::cout << "Coordinate " << i << " of added geom is: "

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

Summary of changes:
 include/geos/operation/overlayng/EdgeKey.inl    | 6 ++++++
 include/geos/operation/overlayng/OverlayGraph.h | 6 +++---
 src/noding/Octant.cpp                           | 6 ------
 src/operation/overlayng/EdgeKey.cpp             | 5 -----
 src/operation/overlayng/ElevationModel.cpp      | 2 --
 tests/unit/capi/GEOSIntersectionPrecTest.cpp    | 3 ++-
 6 files changed, 11 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list