[geos-commits] [SCM] GEOS branch main-relate-ng updated. 7f15043e915f7977c8e94d1e3bc872c6933981c9

git at osgeo.org git at osgeo.org
Mon Aug 12 12:44:45 PDT 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-relate-ng has been updated
       via  7f15043e915f7977c8e94d1e3bc872c6933981c9 (commit)
      from  70c036e84ba2d1f5116b838127932bd4f597f1c3 (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 7f15043e915f7977c8e94d1e3bc872c6933981c9
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Mon Aug 12 12:44:21 2024 -0700

    Fix param name, prepared relate function

diff --git a/src/operation/relateng/RelateNG.cpp b/src/operation/relateng/RelateNG.cpp
index f09a96504..28d583011 100644
--- a/src/operation/relateng/RelateNG.cpp
+++ b/src/operation/relateng/RelateNG.cpp
@@ -183,34 +183,34 @@ RelateNG::relate(const Geometry* a, const Geometry* b, const BoundaryNodeRule& b
 
 /* public */
 bool
-RelateNG::intersects(const Geometry* a)
+RelateNG::intersects(const Geometry* b)
 {
     RelatePredicate::IntersectsPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::crosses(const Geometry* a)
+RelateNG::crosses(const Geometry* b)
 {
     RelatePredicate::CrossesPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::disjoint(const Geometry* a)
+RelateNG::disjoint(const Geometry* b)
 {
     RelatePredicate::DisjointPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::touches(const Geometry* a)
+RelateNG::touches(const Geometry* b)
 {
     RelatePredicate::TouchesPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
@@ -223,57 +223,56 @@ RelateNG::within(const Geometry* a)
 
 /* public */
 bool
-RelateNG::contains(const Geometry* a)
+RelateNG::contains(const Geometry* b)
 {
     RelatePredicate::ContainsPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::overlaps(const Geometry* a)
+RelateNG::overlaps(const Geometry* b)
 {
     RelatePredicate::OverlapsPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::covers(const Geometry* a)
+RelateNG::covers(const Geometry* b)
 {
     RelatePredicate::CoversPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::coveredBy(const Geometry* a)
+RelateNG::coveredBy(const Geometry* b)
 {
     RelatePredicate::CoveredByPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::equalsTopo(const Geometry* a)
+RelateNG::equalsTopo(const Geometry* b)
 {
     RelatePredicate::EqualsTopoPredicate pred;
-    return evaluate(a, pred);
+    return evaluate(b, pred);
 }
 
 /* public */
 bool
-RelateNG::relate(const Geometry* a, const std::string& imPattern)
+RelateNG::relate(const Geometry* b, const std::string& imPattern)
 {
-    return evaluate(a, imPattern);
+    return evaluate(b, imPattern);
 }
 
 /* public */
 std::string
-RelateNG::relate(const Geometry* a)
+RelateNG::relate(const Geometry* b)
 {
-    RelateNG rng(a, false);
-    return rng.evaluate(a)->toString();
+    return evaluate(b)->toString();
 }
 
 /************************************************************************/
diff --git a/tests/unit/operation/relateng/RelateNGTest.h b/tests/unit/operation/relateng/RelateNGTest.h
index c81544a4f..0ef0da411 100644
--- a/tests/unit/operation/relateng/RelateNGTest.h
+++ b/tests/unit/operation/relateng/RelateNGTest.h
@@ -42,7 +42,7 @@ struct test_relateng_support {
         ensure_equals("contains",   prep_a->contains(b.get()),   a->contains(b.get()));
         ensure_equals("crosses",    prep_a->crosses(b.get()),    a->crosses(b.get()));
         ensure_equals("touches",    prep_a->touches(b.get()),    a->touches(b.get()));
-        ensure_equals("relate",     prep_a->relate(b.get()),     a->relate(b.get())->toString());
+        ensure_equals("relate",     prep_a->relate(b.get()),   a->relate(b.get())->toString());
     }
 
     void checkIntersectsDisjoint(const std::string& wkta, const std::string& wktb, bool expectedValue)

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

Summary of changes:
 src/operation/relateng/RelateNG.cpp          | 45 ++++++++++++++--------------
 tests/unit/operation/relateng/RelateNGTest.h |  2 +-
 2 files changed, 23 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list