[geos-commits] [SCM] GEOS branch master updated. 2f6fce40a92912a5d0298719788b99c4d8243146

git at osgeo.org git at osgeo.org
Tue Dec 18 14:41:54 PST 2018


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  2f6fce40a92912a5d0298719788b99c4d8243146 (commit)
      from  f13e1508efebf5ececd9ea0c13a61e34db4e62f1 (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 2f6fce40a92912a5d0298719788b99c4d8243146
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Dec 18 14:41:39 2018 -0800

    Remove use of temporary Envelopes in MonotoneChainEdge
    JTS 940dd3b71e44900fd2f8689085273f3454a737e3

diff --git a/include/geos/geomgraph/index/MonotoneChainEdge.h b/include/geos/geomgraph/index/MonotoneChainEdge.h
index 68c6341..518efa3 100644
--- a/include/geos/geomgraph/index/MonotoneChainEdge.h
+++ b/include/geos/geomgraph/index/MonotoneChainEdge.h
@@ -65,8 +65,6 @@ protected:
 	// Includes the end point of the edge as a sentinel
 	std::vector<size_t> startIndex;
 	// these envelopes are created once and reused
-	geom::Envelope env1;
-	geom::Envelope env2;
 private:
 	void computeIntersectsForChain(size_t start0, size_t end0,
 		const MonotoneChainEdge &mce,
diff --git a/src/geomgraph/index/MonotoneChainEdge.cpp b/src/geomgraph/index/MonotoneChainEdge.cpp
index e86ac28..af2bbb8 100644
--- a/src/geomgraph/index/MonotoneChainEdge.cpp
+++ b/src/geomgraph/index/MonotoneChainEdge.cpp
@@ -134,11 +134,7 @@ MonotoneChainEdge::computeIntersectsForChain(size_t start0, size_t end0,
 	const Coordinate& p10=mce.pts->getAt(start1);
 	const Coordinate& p11=mce.pts->getAt(end1);
 
-	// nothing to do if the envelopes of these chains don't overlap
-	env1.init(p00,p01);
-	env2.init(p10,p11);
-
-	if (!env1.intersects(&env2)) return;
+	if (!Envelope::intersects(p00, p01, p10, p11)) return;
 	// the chains overlap, so split each in half and iterate
 	// (binary search)
 	size_t mid0 = (start0 + end0) / 2;

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

Summary of changes:
 include/geos/geomgraph/index/MonotoneChainEdge.h | 2 --
 src/geomgraph/index/MonotoneChainEdge.cpp        | 6 +-----
 2 files changed, 1 insertion(+), 7 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list