[geos-commits] [SCM] GEOS branch master updated. 3507276eee3ae0623d9aeb4cb91254844834109c

git at osgeo.org git at osgeo.org
Mon Oct 12 07:27:45 PDT 2020


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  3507276eee3ae0623d9aeb4cb91254844834109c (commit)
      from  8d203e348716efed8da34c18b40309259a90024e (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 3507276eee3ae0623d9aeb4cb91254844834109c
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Oct 12 16:27:27 2020 +0200

    Another test for 1051, at another level
    
    References #1051

diff --git a/tests/unit/operation/overlayng/OverlayNGRobustTest.cpp b/tests/unit/operation/overlayng/OverlayNGRobustTest.cpp
index 3b50451..912300a 100644
--- a/tests/unit/operation/overlayng/OverlayNGRobustTest.cpp
+++ b/tests/unit/operation/overlayng/OverlayNGRobustTest.cpp
@@ -44,6 +44,15 @@ struct test_overlayngrobust_data {
         ensure_equals_geometry(geom_expected.get(), geom_result.get());
     }
 
+    void
+    checkOverlaySuccess(const std::string& a, const std::string& b, int opCode)
+    {
+        std::unique_ptr<Geometry> geom_a = r.read(a);
+        std::unique_ptr<Geometry> geom_b = r.read(b);
+        std::unique_ptr<Geometry> geom_expected = r.read(expected);
+		ensure_nothrow( OverlayNGRobust::Overlay(geom_a.get(), geom_b.get(), opCode) );
+    }
+
 };
 
 typedef test_group<test_overlayngrobust_data> group;
@@ -66,6 +75,22 @@ void object::test<1> ()
     testOverlay(a, b, exp, OverlayNG::INTERSECTION);
 }
 
+/**
+ * Tests correct ordering of {@link SegmentNode#compareTo(Object)}.
+ *
+ * See https://trac.osgeo.org/geos/ticket/1051
+ *
+ * JTS equivalent: testSegmentNodeOrderingIntersection()
+ */
+template<>
+template<>
+void object::test<2> ()
+{
+    std::string a = "POLYGON ((654948.3853299792 1794977.105854025, 655016.3812220972 1794939.918901604, 655016.2022581929 1794940.1099794197, 655014.9264068712 1794941.4254068714, 655014.7408834674 1794941.6101225375, 654948.3853299792 1794977.105854025))";
+	std::string b = "POLYGON ((655103.6628454948 1794805.456674405, 655016.20226 1794940.10998, 655014.8317182435 1794941.5196832407, 655014.8295602322 1794941.5218318563, 655014.740883467 1794941.610122538, 655016.6029214273 1794938.7590508445, 655103.6628454948 1794805.456674405))";
+    checkOverlaySuccess(a, b, OverlayNG::INTERSECTION);
+}
+
 
 
 } // namespace tut

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

Summary of changes:
 .../operation/overlayng/OverlayNGRobustTest.cpp    | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list