[geos-commits] [SCM] GEOS branch master updated. beefe21a9e30da64d09daa2f3d831f276a91141c

git at osgeo.org git at osgeo.org
Fri Dec 14 13:26:40 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  beefe21a9e30da64d09daa2f3d831f276a91141c (commit)
      from  678955984311120319e88062f19e2ba32121150e (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 beefe21a9e30da64d09daa2f3d831f276a91141c
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Dec 14 13:26:23 2018 -0800

    Add L/A optimization for covers and contains
    JTS a5f7141c3b723de582a720e4d7faf73928bf3704

diff --git a/include/geos/geosAlgorithm.h b/include/geos/geosAlgorithm.h
index 5dc6c33..d77d2b4 100644
--- a/include/geos/geosAlgorithm.h
+++ b/include/geos/geosAlgorithm.h
@@ -36,7 +36,6 @@
 //#include <geos/algorithm/MinimumDiameter.h>
 //#include <geos/algorithm/NotRepresentableException.h>
 #include <geos/algorithm/PointLocator.h>
-//#include <geos/algorithm/RobustDeterminant.h>
 //#include <geos/algorithm/SimplePointInAreaLocator.h>
 
 namespace geos {
diff --git a/src/algorithm/CGAlgorithms.cpp b/src/algorithm/CGAlgorithms.cpp
index 8b62a77..7ab8599 100644
--- a/src/algorithm/CGAlgorithms.cpp
+++ b/src/algorithm/CGAlgorithms.cpp
@@ -19,7 +19,6 @@
  **********************************************************************/
 
 #include <geos/algorithm/CGAlgorithms.h>
-#include <geos/algorithm/RobustDeterminant.h>
 #include <geos/algorithm/LineIntersector.h>
 #include <geos/algorithm/RayCrossingCounter.h>
 #include <geos/geom/CoordinateSequence.h>
diff --git a/src/algorithm/RayCrossingCounter.cpp b/src/algorithm/RayCrossingCounter.cpp
index 3406cc5..c2853f6 100644
--- a/src/algorithm/RayCrossingCounter.cpp
+++ b/src/algorithm/RayCrossingCounter.cpp
@@ -18,7 +18,6 @@
 
 #include <geos/algorithm/CGAlgorithmsDD.h>
 #include <geos/algorithm/RayCrossingCounter.h>
-#include <geos/algorithm/RobustDeterminant.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/Location.h>
 #include <geos/geom/Coordinate.h>
diff --git a/src/geom/Geometry.cpp b/src/geom/Geometry.cpp
index c83edc9..b2970c5 100644
--- a/src/geom/Geometry.cpp
+++ b/src/geom/Geometry.cpp
@@ -350,6 +350,10 @@ Geometry::intersects(const Geometry *g) const
 bool
 Geometry::covers(const Geometry* g) const
 {
+    if (getDimension() == 1 && g->getDimension() == 2) {
+        return false;
+    }
+
 #ifdef SHORTCIRCUIT_PREDICATES
 	// short-circuit test
 	if (! getEnvelopeInternal()->covers(g->getEnvelopeInternal()))
@@ -390,6 +394,10 @@ Geometry::within(const Geometry *g) const
 bool
 Geometry::contains(const Geometry *g) const
 {
+    if (getDimension() == 1 && g->getDimension() == 2) {
+        return false;
+    }
+
 #ifdef SHORTCIRCUIT_PREDICATES
 	// short-circuit test
 	if (! getEnvelopeInternal()->contains(g->getEnvelopeInternal()))

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

Summary of changes:
 include/geos/geosAlgorithm.h         | 1 -
 src/algorithm/CGAlgorithms.cpp       | 1 -
 src/algorithm/RayCrossingCounter.cpp | 1 -
 src/geom/Geometry.cpp                | 8 ++++++++
 4 files changed, 8 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list