[geos-commits] [SCM] GEOS branch master updated. 14a18becb0c6ec1564241bdc9b41317b9b1c06dd
git at osgeo.org
git at osgeo.org
Mon Sep 21 16:49:02 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 14a18becb0c6ec1564241bdc9b41317b9b1c06dd (commit)
from 3c5ed392f4570a9a434c059b68e26d777570ed47 (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 14a18becb0c6ec1564241bdc9b41317b9b1c06dd
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Sep 21 15:53:25 2020 -0700
Private method name change, https://github.com/dr-jts/jts/commit/1def2ed0c80de4243fa81342a5c876c98bc3f987
diff --git a/include/geos/operation/overlayng/OverlayUtil.h b/include/geos/operation/overlayng/OverlayUtil.h
index 7d26062..00f1ad0 100644
--- a/include/geos/operation/overlayng/OverlayUtil.h
+++ b/include/geos/operation/overlayng/OverlayUtil.h
@@ -61,7 +61,18 @@ private:
static constexpr double SAFE_ENV_BUFFER_FACTOR = 0.1;
static constexpr int SAFE_ENV_GRID_FACTOR = 3;
- static bool overlapEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope);
+ /**
+ * Computes an envelope which covers the extent of the result of
+ * a given overlay operation for given inputs.
+ * The operations which have a result envelope smaller than the extent of the inputs
+ * are:
+ *
+ * - INTERSECTION: result envelope is the intersection of the input envelopes
+ * - DIFERENCE: result envelope is the envelope of the A input geometry
+ *
+ * Otherwise, <code>null</code> is returned to indicate full extent.
+ */
+ static bool resultEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope);
static double safeExpandDistance(const Envelope* env, const PrecisionModel* pm);
static bool safeEnv(const Envelope* env, const PrecisionModel* pm, Envelope& rsltEnvelope);
@@ -78,6 +89,22 @@ private:
public:
static bool isFloating(const PrecisionModel* pm);
+
+ /**
+ * Computes a clipping envelope for overlay input geometries.
+ * The clipping envelope encloses all geometry line segments which
+ * might participate in the overlay, with a buffer to
+ * account for numerical precision
+ * (in particular, rounding due to a precision model.
+ * The clipping envelope is used in both the {@link RingClipper}
+ * and in the {@link LineLimiter}.
+ *
+ * Some overlay operations (i.e. UNION and SYMDIFFERENCE
+ * cannot use clipping as an optimization,
+ * since the result envelope is the full extent of the two input geometries.
+ * In this case the returned
+ * envelope is null to indicate this.
+ */
static bool clippingEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope);
/**
diff --git a/src/operation/overlayng/OverlayUtil.cpp b/src/operation/overlayng/OverlayUtil.cpp
index 80c8d37..b424933 100644
--- a/src/operation/overlayng/OverlayUtil.cpp
+++ b/src/operation/overlayng/OverlayUtil.cpp
@@ -70,7 +70,7 @@ OverlayUtil::safeEnv(const Envelope* env, const PrecisionModel* pm, Envelope& rs
/*private static*/
bool
-OverlayUtil::overlapEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope)
+OverlayUtil::resultEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope)
{
switch (opCode) {
case OverlayNG::INTERSECTION: {
@@ -94,8 +94,8 @@ OverlayUtil::overlapEnvelope(int opCode, const InputGeometry* inputGeom, const P
bool
OverlayUtil::clippingEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope)
{
- bool overlapEnv = overlapEnvelope(opCode, inputGeom, pm, rsltEnvelope);
- if (!overlapEnv)
+ bool resultEnv = resultEnvelope(opCode, inputGeom, pm, rsltEnvelope);
+ if (!resultEnv)
return false;
Envelope clipEnv = RobustClipEnvelopeComputer::getEnvelope(
-----------------------------------------------------------------------
Summary of changes:
include/geos/operation/overlayng/OverlayUtil.h | 29 +++++++++++++++++++++++++-
src/operation/overlayng/OverlayUtil.cpp | 6 +++---
2 files changed, 31 insertions(+), 4 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list