[geos-commits] [SCM] GEOS branch main-relate-ng updated. eacbf9e152ead1572f8f4d105743a5b6de5d867e
git at osgeo.org
git at osgeo.org
Thu Aug 8 15:15:58 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 eacbf9e152ead1572f8f4d105743a5b6de5d867e (commit)
via 324cd1925bc03b120ce401df83a18f237e3dac73 (commit)
from fc3621df2e5dfe01861b0ab1c98d54e3beb77f5f (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 eacbf9e152ead1572f8f4d105743a5b6de5d867e
Merge: 324cd1925 fc3621df2
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Aug 8 15:15:37 2024 -0700
Merge branch 'main-relate-ng' of github.com:libgeos/geos into main-relate-ng
commit 324cd1925bc03b120ce401df83a18f237e3dac73
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Aug 8 15:15:24 2024 -0700
Add non-static methods for boolean predicates, for when we have prepared calls
diff --git a/include/geos/geom/prep/BasicPreparedGeometry.h b/include/geos/geom/prep/BasicPreparedGeometry.h
index 62f8621fa..4297c67f0 100644
--- a/include/geos/geom/prep/BasicPreparedGeometry.h
+++ b/include/geos/geom/prep/BasicPreparedGeometry.h
@@ -20,10 +20,8 @@
#pragma once
#include <geos/geom/prep/PreparedGeometry.h> // for inheritance
-//#include <geos/algorithm/PointLocator.h>
-//#include <geos/geom/util/ComponentCoordinateExtracter.h>
#include <geos/geom/Coordinate.h>
-//#include <geos/geom/Location.h>
+//#include <geos/operation/relateng/RelateNG.h>
#include <vector>
#include <string>
diff --git a/include/geos/operation/relateng/RelateNG.h b/include/geos/operation/relateng/RelateNG.h
index 7106cef9b..ad9f3608e 100644
--- a/include/geos/operation/relateng/RelateNG.h
+++ b/include/geos/operation/relateng/RelateNG.h
@@ -251,25 +251,29 @@ public:
bool evaluate(const Geometry* b, TopologyPredicate& predicate);
static bool intersects(const Geometry* a, const Geometry* b);
-
static bool crosses(const Geometry* a, const Geometry* b);
-
static bool disjoint(const Geometry* a, const Geometry* b);
-
static bool touches(const Geometry* a, const Geometry* b);
-
static bool within(const Geometry* a, const Geometry* b);
-
static bool contains(const Geometry* a, const Geometry* b);
-
static bool overlaps(const Geometry* a, const Geometry* b);
-
static bool covers(const Geometry* a, const Geometry* b);
-
static bool coveredBy(const Geometry* a, const Geometry* b);
-
static bool equalsTopo(const Geometry* a, const Geometry* b);
+ bool intersects(const Geometry* a);
+ bool crosses(const Geometry* a);
+ bool disjoint(const Geometry* a);
+ bool touches(const Geometry* a);
+ bool within(const Geometry* a);
+ bool contains(const Geometry* a);
+ bool overlaps(const Geometry* a);
+ bool covers(const Geometry* a);
+ bool coveredBy(const Geometry* a);
+ bool equalsTopo(const Geometry* a);
+ bool relate(const Geometry* a, const std::string& imPattern);
+
+
};
} // namespace geos.operation.relateng
diff --git a/src/operation/relateng/RelateNG.cpp b/src/operation/relateng/RelateNG.cpp
index 681c58ee3..e49cad962 100644
--- a/src/operation/relateng/RelateNG.cpp
+++ b/src/operation/relateng/RelateNG.cpp
@@ -57,6 +57,8 @@ namespace relateng { // geos.operation.relateng
#define GEOM_B RelateGeometry::GEOM_B
+/************************************************************************/
+
/* public static */
bool
RelateNG::intersects(const Geometry* a, const Geometry* b)
@@ -145,7 +147,6 @@ RelateNG::relate(const Geometry* a, const Geometry* b, TopologyPredicate& pred)
return rng.evaluate(b, pred);
}
-
/* public static */
bool
RelateNG::relate(const Geometry* a, const Geometry* b, TopologyPredicate& pred, const BoundaryNodeRule& bnRule)
@@ -154,7 +155,6 @@ RelateNG::relate(const Geometry* a, const Geometry* b, TopologyPredicate& pred,
return rng.evaluate(b, pred);
}
-
/* public static */
bool
RelateNG::relate(const Geometry* a, const Geometry* b, const std::string& imPattern)
@@ -163,7 +163,6 @@ RelateNG::relate(const Geometry* a, const Geometry* b, const std::string& imPatt
return rng.evaluate(b, imPattern);
}
-
/* public static */
std::unique_ptr<IntersectionMatrix>
RelateNG::relate(const Geometry* a, const Geometry* b)
@@ -172,7 +171,6 @@ RelateNG::relate(const Geometry* a, const Geometry* b)
return rng.evaluate(b);
}
-
/* public static */
std::unique_ptr<IntersectionMatrix>
RelateNG::relate(const Geometry* a, const Geometry* b, const BoundaryNodeRule& bnRule)
@@ -181,6 +179,96 @@ RelateNG::relate(const Geometry* a, const Geometry* b, const BoundaryNodeRule& b
return rng.evaluate(b);
}
+/************************************************************************/
+
+/* public */
+bool
+RelateNG::intersects(const Geometry* a)
+{
+ RelatePredicate::IntersectsPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::crosses(const Geometry* a)
+{
+ RelatePredicate::CrossesPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::disjoint(const Geometry* a)
+{
+ RelatePredicate::DisjointPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::touches(const Geometry* a)
+{
+ RelatePredicate::TouchesPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::within(const Geometry* a)
+{
+ RelatePredicate::WithinPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::contains(const Geometry* a)
+{
+ RelatePredicate::ContainsPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::overlaps(const Geometry* a)
+{
+ RelatePredicate::OverlapsPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::covers(const Geometry* a)
+{
+ RelatePredicate::CoversPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::coveredBy(const Geometry* a)
+{
+ RelatePredicate::CoveredByPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::equalsTopo(const Geometry* a)
+{
+ RelatePredicate::EqualsTopoPredicate pred;
+ return evaluate(a, pred);
+}
+
+/* public */
+bool
+RelateNG::relate(const Geometry* a, const std::string& imPattern)
+{
+ return evaluate(b, imPattern);
+}
+
+/************************************************************************/
/* public static */
std::unique_ptr<RelateNG>
@@ -197,6 +285,7 @@ RelateNG::prepare(const Geometry* a, const BoundaryNodeRule& bnRule)
return std::unique_ptr<RelateNG>(new RelateNG(a, true, bnRule));
}
+/************************************************************************/
/* public */
std::unique_ptr<IntersectionMatrix>
-----------------------------------------------------------------------
Summary of changes:
include/geos/geom/prep/BasicPreparedGeometry.h | 4 +-
include/geos/operation/relateng/RelateNG.h | 22 +++---
src/operation/relateng/RelateNG.cpp | 97 ++++++++++++++++++++++++--
3 files changed, 107 insertions(+), 16 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list