[geos-commits] [SCM] GEOS branch main updated. 078a37eaa6fd0017fefdf3347fa8a5d27f819f51

git at osgeo.org git at osgeo.org
Mon Jan 8 14:23:08 PST 2024


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  078a37eaa6fd0017fefdf3347fa8a5d27f819f51 (commit)
      from  5e806d6918e296c722312c732ff6a0f6df61f416 (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 078a37eaa6fd0017fefdf3347fa8a5d27f819f51
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Mon Jan 8 14:22:47 2024 -0800

    Fix incorrect commented code, add RelatePA tests

diff --git a/src/geomgraph/GeometryGraph.cpp b/src/geomgraph/GeometryGraph.cpp
index c00205b81..1c8e57a9a 100644
--- a/src/geomgraph/GeometryGraph.cpp
+++ b/src/geomgraph/GeometryGraph.cpp
@@ -209,10 +209,9 @@ GeometryGraph::addCollection(const GeometryCollection* gc)
 {
     for(std::size_t i = 0, n = gc->getNumGeometries(); i < n; ++i) {
         const Geometry* g = gc->getGeometryN(i);
-        //if (! g->isEmpty()) {
+        if (! g->isEmpty()) {
             add(g);
-        //}
-        
+        }
     }
 }
 
diff --git a/tests/xmltester/tests/general/TestRelatePA.xml b/tests/xmltester/tests/general/TestRelatePA.xml
index 07ceb7e93..4c2345a7d 100644
--- a/tests/xmltester/tests/general/TestRelatePA.xml
+++ b/tests/xmltester/tests/general/TestRelatePA.xml
@@ -157,7 +157,7 @@
 </case>
 
 <case>
-  <desc>mPA - empty MultiPoint element</desc>
+  <desc>mPA - empty MultiPoint element for A</desc>
   <a>
     MULTIPOINT(EMPTY,(0 0))
   </a>
@@ -181,6 +181,81 @@
 <test><op name="within"     arg1="A" arg2="B"> true  </op></test>
 </case>
 
+<case>
+  <desc>mPA - empty MultiPoint element for A, on boundary of B</desc>
+  <a>
+    MULTIPOINT(EMPTY,(1 0))
+  </a>
+  <b>
+    POLYGON ((1 0,0 1,-1 0,0 -1, 1 0))
+  </b>
+<test>
+  <op name="relate" arg3="F0FFFF212" arg1="A" arg2="B">
+    true
+  </op>
+</test>
+<test><op name="contains"   arg1="A" arg2="B"> false </op></test>
+<test><op name="coveredBy"  arg1="A" arg2="B"> true  </op></test>
+<test><op name="covers"     arg1="A" arg2="B"> false </op></test>
+<test><op name="crosses"    arg1="A" arg2="B"> false </op></test>
+<test><op name="disjoint"   arg1="A" arg2="B"> false </op></test>
+<test><op name="equalsTopo" arg1="A" arg2="B"> false </op></test>
+<test><op name="intersects" arg1="A" arg2="B"> true  </op></test>
+<test><op name="overlaps"   arg1="A" arg2="B"> false </op></test>
+<test><op name="touches"    arg1="A" arg2="B"> true </op></test>
+<test><op name="within"     arg1="A" arg2="B"> false  </op></test>
+</case>
+
+<case>
+  <desc>mPA - empty MultiPoint element for B</desc>
+  <a>
+    POLYGON ((1 0,0 1,-1 0,0 -1, 1 0))
+  </a>
+  <b>
+    MULTIPOINT(EMPTY,(0 0))
+  </b>
+<test>
+  <op name="relate" arg3="0F2FF1FF2" arg1="A" arg2="B">
+    true
+  </op>
+</test>
+<test><op name="contains"   arg1="A" arg2="B"> true </op></test>
+<test><op name="coveredBy"  arg1="A" arg2="B"> false  </op></test>
+<test><op name="covers"     arg1="A" arg2="B"> true </op></test>
+<test><op name="crosses"    arg1="A" arg2="B"> false </op></test>
+<test><op name="disjoint"   arg1="A" arg2="B"> false </op></test>
+<test><op name="equalsTopo" arg1="A" arg2="B"> false </op></test>
+<test><op name="intersects" arg1="A" arg2="B"> true  </op></test>
+<test><op name="overlaps"   arg1="A" arg2="B"> false </op></test>
+<test><op name="touches"    arg1="A" arg2="B"> false </op></test>
+<test><op name="within"     arg1="A" arg2="B"> false  </op></test>
+</case>
+
+<case>
+  <desc>mPA - empty MultiPoint element for B, on boundary of A</desc>
+  <a>
+    POLYGON ((1 0,0 1,-1 0,0 -1, 1 0))
+  </a>
+  <b>
+    MULTIPOINT(EMPTY,(1 0))
+  </b>
+<test>
+  <op name="relate" arg3="FF20F1FF2" arg1="A" arg2="B">
+    true
+  </op>
+</test>
+<test><op name="contains"   arg1="A" arg2="B"> false </op></test>
+<test><op name="coveredBy"  arg1="A" arg2="B"> false  </op></test>
+<test><op name="covers"     arg1="A" arg2="B"> true </op></test>
+<test><op name="crosses"    arg1="A" arg2="B"> false </op></test>
+<test><op name="disjoint"   arg1="A" arg2="B"> false </op></test>
+<test><op name="equalsTopo" arg1="A" arg2="B"> false </op></test>
+<test><op name="intersects" arg1="A" arg2="B"> true  </op></test>
+<test><op name="overlaps"   arg1="A" arg2="B"> false </op></test>
+<test><op name="touches"    arg1="A" arg2="B"> true </op></test>
+<test><op name="within"     arg1="A" arg2="B"> false  </op></test>
+</case>
+
 <case>
   <desc>PmA - empty MultiPolygon element</desc>
   <a>

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

Summary of changes:
 src/geomgraph/GeometryGraph.cpp                |  5 +-
 tests/xmltester/tests/general/TestRelatePA.xml | 77 +++++++++++++++++++++++++-
 2 files changed, 78 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list