[geos-commits] [SCM] GEOS branch master updated. 4ae0648ae8f23952a9ca30b57f2706f3492b1e28

git at osgeo.org git at osgeo.org
Fri Dec 7 13:57:11 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  4ae0648ae8f23952a9ca30b57f2706f3492b1e28 (commit)
       via  d1a18e4bc4a9faf5fade6c2aa35faa8a1bd96e07 (commit)
      from  67b3af0b798cd6b7a36ac217923137602deba578 (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 4ae0648ae8f23952a9ca30b57f2706f3492b1e28
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Dec 7 13:56:41 2018 -0800

    Reformatting pass for some wonky formatting

diff --git a/include/geos/algorithm/locate/IndexedPointInAreaLocator.h b/include/geos/algorithm/locate/IndexedPointInAreaLocator.h
index 82bde41..03bff38 100644
--- a/include/geos/algorithm/locate/IndexedPointInAreaLocator.h
+++ b/include/geos/algorithm/locate/IndexedPointInAreaLocator.h
@@ -25,15 +25,15 @@
 #include <vector> // composition
 
 namespace geos {
-	namespace algorithm {
-		class RayCrossingCounter;
-	}
-	namespace geom {
-		class Geometry;
-		class Coordinate;
-		class CoordinateSequence;
-		class LineSegment;
-	}
+namespace algorithm {
+class RayCrossingCounter;
+}
+namespace geom {
+class Geometry;
+class Coordinate;
+class CoordinateSequence;
+class LineSegment;
+}
 }
 
 namespace geos {
@@ -54,67 +54,67 @@ namespace locate { // geos::algorithm::locate
 class IndexedPointInAreaLocator : public PointOnGeometryLocator
 {
 private:
-	class IntervalIndexedGeometry
-	{
-	private:
-		index::intervalrtree::SortedPackedIntervalRTree index;
+    class IntervalIndexedGeometry
+    {
+    private:
+        index::intervalrtree::SortedPackedIntervalRTree index;
 
-		void init( const geom::Geometry & g);
-		void addLine(const geom::CoordinateSequence * pts);
+        void init(const geom::Geometry & g);
+        void addLine(const geom::CoordinateSequence * pts);
 
-		// To keep track of LineSegments
-		std::vector< geom::LineSegment > segments;
+        // To keep track of LineSegments
+        std::vector< geom::LineSegment > segments;
 
-	public:
-		IntervalIndexedGeometry( const geom::Geometry & g);
+    public:
+        IntervalIndexedGeometry(const geom::Geometry & g);
 
-		void query(double min, double max, index::ItemVisitor * visitor);
-	};
+        void query(double min, double max, index::ItemVisitor * visitor);
+    };
 
 
-	class SegmentVisitor : public index::ItemVisitor
-	{
-	private:
-		algorithm::RayCrossingCounter * counter;
+    class SegmentVisitor : public index::ItemVisitor
+    {
+    private:
+        algorithm::RayCrossingCounter * counter;
 
-	public:
-		SegmentVisitor( algorithm::RayCrossingCounter * p_counter)
-		:	counter( p_counter)
-		{ }
+    public:
+        SegmentVisitor(algorithm::RayCrossingCounter * p_counter)
+            :	counter(p_counter)
+        { }
 
-		~SegmentVisitor() override
-		{ }
+        ~SegmentVisitor() override
+        { }
 
-		void visitItem( void * item) override;
-	};
+        void visitItem(void * item) override;
+    };
 
 
-	const geom::Geometry & areaGeom;
-	std::unique_ptr<IntervalIndexedGeometry> index;
+    const geom::Geometry & areaGeom;
+    std::unique_ptr<IntervalIndexedGeometry> index;
 
-	void buildIndex( const geom::Geometry & g);
+    void buildIndex(const geom::Geometry & g);
 
     // Declare type as noncopyable
     IndexedPointInAreaLocator(const IndexedPointInAreaLocator& other) = delete;
     IndexedPointInAreaLocator& operator=(const IndexedPointInAreaLocator& rhs) = delete;
 
 public:
-	/**
-	 * Creates a new locator for a given {@link Geometry}
-	 * {@link Polygonal} and {@link LinearRing} geometries
-   * are supported.
-   *
-	 * @param g the Geometry to locate in
-	 */
-	IndexedPointInAreaLocator( const geom::Geometry & g);
-
-	/**
-	 * Determines the {@link Location} of a point in an areal {@link Geometry}.
-	 *
-	 * @param p the point to test
-	 * @return the location of the point in the geometry
-	 */
-	int locate( const geom::Coordinate * /*const*/ p) override;
+    /**
+     * Creates a new locator for a given {@link Geometry}
+     * {@link Polygonal} and {@link LinearRing} geometries
+    * are supported.
+    *
+     * @param g the Geometry to locate in
+     */
+    IndexedPointInAreaLocator(const geom::Geometry & g);
+
+    /**
+     * Determines the {@link Location} of a point in an areal {@link Geometry}.
+     *
+     * @param p the point to test
+     * @return the location of the point in the geometry
+     */
+    int locate(const geom::Coordinate * /*const*/ p) override;
 
 };
 
diff --git a/include/geos/algorithm/locate/SimplePointInAreaLocator.h b/include/geos/algorithm/locate/SimplePointInAreaLocator.h
index 6cd18a0..4020230 100644
--- a/include/geos/algorithm/locate/SimplePointInAreaLocator.h
+++ b/include/geos/algorithm/locate/SimplePointInAreaLocator.h
@@ -20,11 +20,11 @@
 
 // Forward declarations
 namespace geos {
-	namespace geom {
-		class Geometry;
-		class Coordinate;
-		class Polygon;
-	}
+namespace geom {
+class Geometry;
+class Coordinate;
+class Polygon;
+}
 }
 
 namespace geos {
@@ -49,36 +49,36 @@ class SimplePointInAreaLocator : public PointOnGeometryLocator
 
 public:
 
-	static int locate(const geom::Coordinate& p,
-			const geom::Geometry *geom);
-
-	/**
-   * Determines the {@link Location} of a point in a {@link Polygon}.
-   * Computes {@link Location::BOUNDARY} if the point lies exactly
-   * on the polygon boundary.
-   *
-   * @param p the point to test
-   * @param poly the geometry to test
-   * @return the Location of the point in the polygon
-   */
-	static int locatePointInPolygon(const geom::Coordinate& p,
-			const geom::Polygon *poly);
-
-	SimplePointInAreaLocator( const geom::Geometry * p_g)
-	:	g( p_g)
-	{ }
-
-	int locate( const geom::Coordinate * p) override
-	{
-		return locate( *p, g);
-	}
+    static int locate(const geom::Coordinate& p,
+                      const geom::Geometry *geom);
+
+    /**
+    * Determines the {@link Location} of a point in a {@link Polygon}.
+    * Computes {@link Location::BOUNDARY} if the point lies exactly
+    * on the polygon boundary.
+    *
+    * @param p the point to test
+    * @param poly the geometry to test
+    * @return the Location of the point in the polygon
+    */
+    static int locatePointInPolygon(const geom::Coordinate& p,
+                                    const geom::Polygon *poly);
+
+    SimplePointInAreaLocator(const geom::Geometry * p_g)
+        :	g(p_g)
+    { }
+
+    int locate(const geom::Coordinate * p) override
+    {
+        return locate(*p, g);
+    }
 
 private:
 
-	static int locateInGeometry(const geom::Coordinate& p,
-			const geom::Geometry *geom);
+    static int locateInGeometry(const geom::Coordinate& p,
+                                const geom::Geometry *geom);
 
-	const geom::Geometry * g;
+    const geom::Geometry * g;
 
 };
 
diff --git a/src/algorithm/locate/IndexedPointInAreaLocator.cpp b/src/algorithm/locate/IndexedPointInAreaLocator.cpp
index eef9804..7ded462 100644
--- a/src/algorithm/locate/IndexedPointInAreaLocator.cpp
+++ b/src/algorithm/locate/IndexedPointInAreaLocator.cpp
@@ -39,40 +39,40 @@ namespace locate {
 //
 IndexedPointInAreaLocator::IntervalIndexedGeometry::IntervalIndexedGeometry( const geom::Geometry & g)
 {
-	init( g);
+    init( g);
 }
 
 void
 IndexedPointInAreaLocator::IntervalIndexedGeometry::init( const geom::Geometry & g)
 {
-	geom::LineString::ConstVect lines;
-	geom::util::LinearComponentExtracter::getLines( g, lines);
+    geom::LineString::ConstVect lines;
+    geom::util::LinearComponentExtracter::getLines( g, lines);
 
-	for (const geom::LineString* line : lines) {
-		addLine(line->getCoordinatesRO());
-	}
+    for (const geom::LineString* line : lines) {
+        addLine(line->getCoordinatesRO());
+    }
 
-	for (geom::LineSegment & seg : segments) {
-		index.insert(
-			std::min( seg.p0.y, seg.p1.y),
-			std::max( seg.p0.y, seg.p1.y),
+    for (geom::LineSegment & seg : segments) {
+        index.insert(
+            std::min( seg.p0.y, seg.p1.y),
+            std::max( seg.p0.y, seg.p1.y),
             &seg);
-	}
+    }
 }
 
 void
 IndexedPointInAreaLocator::IntervalIndexedGeometry::addLine(const geom::CoordinateSequence * pts)
 {
-	for (size_t i = 1, ni = pts->size(); i < ni; i++) {
-		segments.emplace_back((*pts)[i - 1], (*pts)[i]);
-	}
+    for (size_t i = 1, ni = pts->size(); i < ni; i++) {
+        segments.emplace_back((*pts)[i - 1], (*pts)[i]);
+    }
 }
 
 
 void
 IndexedPointInAreaLocator::buildIndex( const geom::Geometry & g)
 {
-	index = std::unique_ptr<IntervalIndexedGeometry>(new IntervalIndexedGeometry(g));
+    index = std::unique_ptr<IntervalIndexedGeometry>(new IntervalIndexedGeometry(g));
 }
 
 
@@ -84,41 +84,41 @@ IndexedPointInAreaLocator::buildIndex( const geom::Geometry & g)
 // public:
 //
 IndexedPointInAreaLocator::IndexedPointInAreaLocator( const geom::Geometry & g)
-:	areaGeom( g)
+    :	areaGeom( g)
 {
-	const std::type_info& areaGeomId = typeid(areaGeom);
-	if (	areaGeomId != typeid( geom::Polygon)
-		&&	areaGeomId != typeid( geom::MultiPolygon)
-		&&	areaGeomId != typeid( geom::LinearRing) )
-		throw util::IllegalArgumentException("Argument must be Polygonal or LinearRing");
+    const std::type_info& areaGeomId = typeid(areaGeom);
+    if (	areaGeomId != typeid( geom::Polygon)
+            &&	areaGeomId != typeid( geom::MultiPolygon)
+            &&	areaGeomId != typeid( geom::LinearRing) )
+        throw util::IllegalArgumentException("Argument must be Polygonal or LinearRing");
 
-	buildIndex( areaGeom);
+    buildIndex( areaGeom);
 }
 
 int
 IndexedPointInAreaLocator::locate( const geom::Coordinate * /*const*/ p)
 {
-	algorithm::RayCrossingCounter rcc(*p);
+    algorithm::RayCrossingCounter rcc(*p);
 
-	IndexedPointInAreaLocator::SegmentVisitor visitor( &rcc);
+    IndexedPointInAreaLocator::SegmentVisitor visitor( &rcc);
 
-	index->query( p->y, p->y, &visitor);
+    index->query( p->y, p->y, &visitor);
 
-	return rcc.getLocation();
+    return rcc.getLocation();
 }
 
 void
 IndexedPointInAreaLocator::SegmentVisitor::visitItem( void * item)
 {
-	geom::LineSegment* seg = static_cast<geom::LineSegment*>(item);
+    geom::LineSegment* seg = static_cast<geom::LineSegment*>(item);
 
-	counter->countSegment(seg->p0, seg->p1);
+    counter->countSegment(seg->p0, seg->p1);
 }
 
 void
 IndexedPointInAreaLocator::IntervalIndexedGeometry::query( double min, double max, index::ItemVisitor * visitor)
 {
-	index.query( min, max, visitor);
+    index.query( min, max, visitor);
 }
 
 
diff --git a/src/algorithm/locate/SimplePointInAreaLocator.cpp b/src/algorithm/locate/SimplePointInAreaLocator.cpp
index d1a9ad3..b20ef58 100644
--- a/src/algorithm/locate/SimplePointInAreaLocator.cpp
+++ b/src/algorithm/locate/SimplePointInAreaLocator.cpp
@@ -39,57 +39,57 @@ namespace locate { // geos.algorithm
 int
 SimplePointInAreaLocator::locate(const Coordinate& p, const Geometry *geom)
 {
-	if (geom->isEmpty())
-		return Location::EXTERIOR;
+    if (geom->isEmpty())
+        return Location::EXTERIOR;
 
-	return locateInGeometry(p, geom);
+    return locateInGeometry(p, geom);
 }
 
 int
 SimplePointInAreaLocator::locateInGeometry(const Coordinate& p,const Geometry *geom)
 {
-	if (const Polygon *poly = dynamic_cast<const Polygon*>(geom))
-	{
-		return locatePointInPolygon(p, poly);
-	}
+    if (const Polygon *poly = dynamic_cast<const Polygon*>(geom))
+    {
+        return locatePointInPolygon(p, poly);
+    }
 
-	if (const GeometryCollection *col = dynamic_cast<const GeometryCollection*>(geom))
-	{
-		for (auto g2: *col)
-		{
-			assert (g2!=geom);
-			int loc = locateInGeometry(p, g2);
-			if (loc != Location::EXTERIOR)
-				return loc;
-		}
-	}
-	return Location::EXTERIOR;
+    if (const GeometryCollection *col = dynamic_cast<const GeometryCollection*>(geom))
+    {
+        for (auto g2: *col)
+        {
+            assert (g2!=geom);
+            int loc = locateInGeometry(p, g2);
+            if (loc != Location::EXTERIOR)
+                return loc;
+        }
+    }
+    return Location::EXTERIOR;
 }
 
 int
 SimplePointInAreaLocator::locatePointInPolygon(const Coordinate& p, const Polygon *poly)
 {
-	if (poly->isEmpty()) return Location::EXTERIOR;
-	const LineString *shell=poly->getExteriorRing();
-	const CoordinateSequence *cl;
-	cl = shell->getCoordinatesRO();
-	int shellLoc = CGAlgorithms::locatePointInRing(p,*cl);
-	if (shellLoc != Location::INTERIOR)
-		return shellLoc;
+    if (poly->isEmpty()) return Location::EXTERIOR;
+    const LineString *shell=poly->getExteriorRing();
+    const CoordinateSequence *cl;
+    cl = shell->getCoordinatesRO();
+    int shellLoc = CGAlgorithms::locatePointInRing(p,*cl);
+    if (shellLoc != Location::INTERIOR)
+        return shellLoc;
 
-	// now test if the point lies in or on the holes
-	for(size_t i=0, n=poly->getNumInteriorRing(); i<n; i++)
-	{
-		const LineString *hole = poly->getInteriorRingN(i);
-		cl = hole->getCoordinatesRO();
-		int holeLoc = CGAlgorithms::locatePointInRing(p,*cl);
-		if (holeLoc == Location::BOUNDARY)
-			return Location::BOUNDARY;
-		if (holeLoc == Location::INTERIOR)
-			return Location::EXTERIOR;
-		// if in EXTERIOR of this hole, keep checking other holes
-	}
-	return Location::INTERIOR;
+    // now test if the point lies in or on the holes
+    for(size_t i=0, n=poly->getNumInteriorRing(); i<n; i++)
+    {
+        const LineString *hole = poly->getInteriorRingN(i);
+        cl = hole->getCoordinatesRO();
+        int holeLoc = CGAlgorithms::locatePointInRing(p,*cl);
+        if (holeLoc == Location::BOUNDARY)
+            return Location::BOUNDARY;
+        if (holeLoc == Location::INTERIOR)
+            return Location::EXTERIOR;
+        // if in EXTERIOR of this hole, keep checking other holes
+    }
+    return Location::INTERIOR;
 }
 
 } // namespace geos.algorithm.locate

commit d1a18e4bc4a9faf5fade6c2aa35faa8a1bd96e07
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Dec 7 13:44:34 2018 -0800

    Update AreaLocator classes to return Location
    instead of boolean, to mirror JTS update in 6fac55a95727fab0989be39eb8491c1bb27666dd

diff --git a/include/geos/algorithm/locate/IndexedPointInAreaLocator.h b/include/geos/algorithm/locate/IndexedPointInAreaLocator.h
index c6bb288..82bde41 100644
--- a/include/geos/algorithm/locate/IndexedPointInAreaLocator.h
+++ b/include/geos/algorithm/locate/IndexedPointInAreaLocator.h
@@ -42,13 +42,14 @@ namespace locate { // geos::algorithm::locate
 
 /** \brief
  * Determines the location of {@link Coordinate}s relative to
- * a {@link Polygon} or {@link MultiPolygon} geometry, using indexing for efficiency.
+ * an areal geometry, using indexing for efficiency.
  *
- * This algorithm is suitable for use in cases where
- * many points will be tested against a given area.
- *
- * @author Martin Davis
+ * The Location is computed precisely, in that points
+ * located on the geometry boundary or segments will
+ * return {@link Location.BOUNDARY}.
  *
+ * {@link Polygonal} and {@link LinearRing} geometries
+ * are supported.
  */
 class IndexedPointInAreaLocator : public PointOnGeometryLocator
 {
@@ -100,6 +101,9 @@ private:
 public:
 	/**
 	 * Creates a new locator for a given {@link Geometry}
+	 * {@link Polygonal} and {@link LinearRing} geometries
+   * are supported.
+   *
 	 * @param g the Geometry to locate in
 	 */
 	IndexedPointInAreaLocator( const geom::Geometry & g);
diff --git a/include/geos/algorithm/locate/SimplePointInAreaLocator.h b/include/geos/algorithm/locate/SimplePointInAreaLocator.h
index f1f40f3..6cd18a0 100644
--- a/include/geos/algorithm/locate/SimplePointInAreaLocator.h
+++ b/include/geos/algorithm/locate/SimplePointInAreaLocator.h
@@ -52,7 +52,16 @@ public:
 	static int locate(const geom::Coordinate& p,
 			const geom::Geometry *geom);
 
-	static bool containsPointInPolygon(const geom::Coordinate& p,
+	/**
+   * Determines the {@link Location} of a point in a {@link Polygon}.
+   * Computes {@link Location::BOUNDARY} if the point lies exactly
+   * on the polygon boundary.
+   *
+   * @param p the point to test
+   * @param poly the geometry to test
+   * @return the Location of the point in the polygon
+   */
+	static int locatePointInPolygon(const geom::Coordinate& p,
 			const geom::Polygon *poly);
 
 	SimplePointInAreaLocator( const geom::Geometry * p_g)
@@ -66,7 +75,7 @@ public:
 
 private:
 
-	static bool containsPoint(const geom::Coordinate& p,
+	static int locateInGeometry(const geom::Coordinate& p,
 			const geom::Geometry *geom);
 
 	const geom::Geometry * g;
diff --git a/src/algorithm/locate/IndexedPointInAreaLocator.cpp b/src/algorithm/locate/IndexedPointInAreaLocator.cpp
index 47fbed5..eef9804 100644
--- a/src/algorithm/locate/IndexedPointInAreaLocator.cpp
+++ b/src/algorithm/locate/IndexedPointInAreaLocator.cpp
@@ -20,6 +20,7 @@
 #include <geos/geom/MultiPolygon.h>
 #include <geos/geom/LineString.h>
 #include <geos/geom/LineSegment.h>
+#include <geos/geom/LinearRing.h>
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/util/LinearComponentExtracter.h>
 #include <geos/index/intervalrtree/SortedPackedIntervalRTree.h>
@@ -85,9 +86,11 @@ IndexedPointInAreaLocator::buildIndex( const geom::Geometry & g)
 IndexedPointInAreaLocator::IndexedPointInAreaLocator( const geom::Geometry & g)
 :	areaGeom( g)
 {
-	if (	typeid( areaGeom) != typeid( geom::Polygon)
-		&&	typeid( areaGeom) != typeid( geom::MultiPolygon) )
-		throw util::IllegalArgumentException("Argument must be Polygonal");
+	const std::type_info& areaGeomId = typeid(areaGeom);
+	if (	areaGeomId != typeid( geom::Polygon)
+		&&	areaGeomId != typeid( geom::MultiPolygon)
+		&&	areaGeomId != typeid( geom::LinearRing) )
+		throw util::IllegalArgumentException("Argument must be Polygonal or LinearRing");
 
 	buildIndex( areaGeom);
 }
diff --git a/src/algorithm/locate/SimplePointInAreaLocator.cpp b/src/algorithm/locate/SimplePointInAreaLocator.cpp
index 7973372..d1a9ad3 100644
--- a/src/algorithm/locate/SimplePointInAreaLocator.cpp
+++ b/src/algorithm/locate/SimplePointInAreaLocator.cpp
@@ -39,56 +39,57 @@ namespace locate { // geos.algorithm
 int
 SimplePointInAreaLocator::locate(const Coordinate& p, const Geometry *geom)
 {
-	if (geom->isEmpty()) return Location::EXTERIOR;
-	if (containsPoint(p,geom))
-		return Location::INTERIOR;
-	return Location::EXTERIOR;
+	if (geom->isEmpty())
+		return Location::EXTERIOR;
+
+	return locateInGeometry(p, geom);
 }
 
-bool
-SimplePointInAreaLocator::containsPoint(const Coordinate& p,const Geometry *geom)
+int
+SimplePointInAreaLocator::locateInGeometry(const Coordinate& p,const Geometry *geom)
 {
 	if (const Polygon *poly = dynamic_cast<const Polygon*>(geom))
 	{
-		return containsPointInPolygon(p, poly);
+		return locatePointInPolygon(p, poly);
 	}
 
 	if (const GeometryCollection *col = dynamic_cast<const GeometryCollection*>(geom))
 	{
-		for (GeometryCollection::const_iterator
-				it=col->begin(), endIt=col->end();
-				it != endIt;
-				++it)
+		for (auto g2: *col)
 		{
-			const Geometry *g2=*it;
 			assert (g2!=geom);
-			if (containsPoint(p,g2)) return true;
+			int loc = locateInGeometry(p, g2);
+			if (loc != Location::EXTERIOR)
+				return loc;
 		}
 	}
-	return false;
+	return Location::EXTERIOR;
 }
 
-bool
-SimplePointInAreaLocator::containsPointInPolygon(const Coordinate& p, const Polygon *poly)
+int
+SimplePointInAreaLocator::locatePointInPolygon(const Coordinate& p, const Polygon *poly)
 {
-	if (poly->isEmpty()) return false;
+	if (poly->isEmpty()) return Location::EXTERIOR;
 	const LineString *shell=poly->getExteriorRing();
 	const CoordinateSequence *cl;
 	cl = shell->getCoordinatesRO();
-	if (!CGAlgorithms::isPointInRing(p,cl)) {
-		return false;
-	}
+	int shellLoc = CGAlgorithms::locatePointInRing(p,*cl);
+	if (shellLoc != Location::INTERIOR)
+		return shellLoc;
 
 	// now test if the point lies in or on the holes
 	for(size_t i=0, n=poly->getNumInteriorRing(); i<n; i++)
 	{
 		const LineString *hole = poly->getInteriorRingN(i);
 		cl = hole->getCoordinatesRO();
-		if (CGAlgorithms::isPointInRing(p,cl)) {
-			return false;
-		}
+		int holeLoc = CGAlgorithms::locatePointInRing(p,*cl);
+		if (holeLoc == Location::BOUNDARY)
+			return Location::BOUNDARY;
+		if (holeLoc == Location::INTERIOR)
+			return Location::EXTERIOR;
+		// if in EXTERIOR of this hole, keep checking other holes
 	}
-	return true;
+	return Location::INTERIOR;
 }
 
 } // namespace geos.algorithm.locate
diff --git a/src/operation/predicate/RectangleIntersects.cpp b/src/operation/predicate/RectangleIntersects.cpp
index cbb54e8..db7036e 100644
--- a/src/operation/predicate/RectangleIntersects.cpp
+++ b/src/operation/predicate/RectangleIntersects.cpp
@@ -28,6 +28,7 @@
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/LineString.h>
 #include <geos/geom/IntersectionMatrix.h>
+#include <geos/geom/Location.h>
 
 #include <geos/algorithm/locate/SimplePointInAreaLocator.h>
 
@@ -166,7 +167,7 @@ protected:
 
 			// check rect point in poly (rect is known not to
 			// touch polygon at this point)
-			if ( SimplePointInAreaLocator::containsPointInPolygon(rectPt, poly) )
+			if (SimplePointInAreaLocator::locatePointInPolygon(rectPt, poly) != geom::Location::EXTERIOR)
 			{
 				containsPointVar=true;
 				return;

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

Summary of changes:
 .../algorithm/locate/IndexedPointInAreaLocator.h   | 112 +++++++++++----------
 .../algorithm/locate/SimplePointInAreaLocator.h    |  53 ++++++----
 src/algorithm/locate/IndexedPointInAreaLocator.cpp |  57 ++++++-----
 src/algorithm/locate/SimplePointInAreaLocator.cpp  |  85 ++++++++--------
 src/operation/predicate/RectangleIntersects.cpp    |   3 +-
 5 files changed, 164 insertions(+), 146 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list