[geos-commits] [SCM] GEOS branch main-relate-ng updated. ec6423c5442a2c23742cc4ec954e8f4cb12b975d
git at osgeo.org
git at osgeo.org
Mon Aug 12 16:06:43 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 ec6423c5442a2c23742cc4ec954e8f4cb12b975d (commit)
from bc3e7cea24aaa6794863d740455f7901948cb280 (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 ec6423c5442a2c23742cc4ec954e8f4cb12b975d
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Aug 12 16:06:16 2024 -0700
Add explanations for c++ complexity in RelateGeometry::extractSegmentStrings;
diff --git a/src/operation/relateng/RelateGeometry.cpp b/src/operation/relateng/RelateGeometry.cpp
index b3bbfa6b8..94536c16e 100644
--- a/src/operation/relateng/RelateGeometry.cpp
+++ b/src/operation/relateng/RelateGeometry.cpp
@@ -365,6 +365,9 @@ RelateGeometry::extractSegmentStrings(bool isA, const Envelope* env)
{
std::vector<const SegmentString*> segStrings;
+ // When we get called in the context of a prepared geometry
+ // geomA might already have segments extracted and stored,
+ // so check and reuse them if possible
if (isA && isPrepared() && env == nullptr) {
if (segStringPermStore.empty()) {
extractSegmentStrings(isA, env, geom, segStrings, segStringPermStore);
@@ -375,6 +378,9 @@ RelateGeometry::extractSegmentStrings(bool isA, const Envelope* env)
}
}
}
+ // In the context of geomB we always extract for each call,
+ // and same goes for geomA when not in prepared mode, or when
+ // using an envelope filter.
else {
segStringTempStore.clear();
extractSegmentStrings(isA, env, geom, segStrings, segStringTempStore);
-----------------------------------------------------------------------
Summary of changes:
src/operation/relateng/RelateGeometry.cpp | 6 ++++++
1 file changed, 6 insertions(+)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list