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

git at osgeo.org git at osgeo.org
Tue Dec 18 14:24:43 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  f13e1508efebf5ececd9ea0c13a61e34db4e62f1 (commit)
      from  baa5f0cae661136dfa03ee3ef5ea93ccf7959192 (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 f13e1508efebf5ececd9ea0c13a61e34db4e62f1
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Dec 18 14:24:20 2018 -0800

    Move CGAlgorithms point location functions to PointLocation
    JTS 555e2cbc45ce6207e3b4df9842cbb25220c494d5

diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 383e468..a478639 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -44,7 +44,7 @@
 #include <geos/io/WKTWriter.h>
 #include <geos/io/WKBWriter.h>
 #include <geos/algorithm/BoundaryNodeRule.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/MinimumDiameter.h>
 #include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
@@ -6776,7 +6776,7 @@ int GEOSOrientationIndex_r(GEOSContextHandle_t extHandle,
     GEOSContextHandleInternal_t *handle = 0;
 
     using geos::geom::Coordinate;
-    using geos::algorithm::CGAlgorithms;
+    using geos::algorithm::Orientation;
 
     if ( 0 == extHandle )
     {
@@ -6794,7 +6794,7 @@ int GEOSOrientationIndex_r(GEOSContextHandle_t extHandle,
         Coordinate A(Ax, Ay);
         Coordinate B(Bx, By);
         Coordinate P(Px, Py);
-        return CGAlgorithms::orientationIndex(A, B, P);
+        return Orientation::index(A, B, P);
     }
     catch (const std::exception &e)
     {
diff --git a/include/geos/algorithm/Angle.h b/include/geos/algorithm/Angle.h
index 9b6d00c..314d5e4 100644
--- a/include/geos/algorithm/Angle.h
+++ b/include/geos/algorithm/Angle.h
@@ -20,7 +20,7 @@
 #define GEOS_ALGORITHM_ANGLE_H
 
 #include <geos/export.h>
-#include <geos/algorithm/CGAlgorithms.h> // for constants
+#include <geos/algorithm/Orientation.h> // for constants
 
 // Forward declarations
 namespace geos {
@@ -45,13 +45,13 @@ public:
 	static const double PI_OVER_4; // PI / 4.0;
 
 	/// Constant representing counterclockwise orientation
-	static const int COUNTERCLOCKWISE = CGAlgorithms::COUNTERCLOCKWISE;
+	static const int COUNTERCLOCKWISE = Orientation::COUNTERCLOCKWISE;
 
 	/// Constant representing clockwise orientation
-	static const int CLOCKWISE = CGAlgorithms::CLOCKWISE;
+	static const int CLOCKWISE = Orientation::CLOCKWISE;
 
 	/// Constant representing no orientation
-	static const int NONE = CGAlgorithms::COLLINEAR;
+	static const int NONE = Orientation::COLLINEAR;
 
 	/// Converts from radians to degrees.
 	//
diff --git a/include/geos/algorithm/Makefile.am b/include/geos/algorithm/Makefile.am
index 113c1fb..0906469 100644
--- a/include/geos/algorithm/Makefile.am
+++ b/include/geos/algorithm/Makefile.am
@@ -28,6 +28,7 @@ geos_HEADERS = \
 	MinimumDiameter.h \
 	NotRepresentableException.h \
 	Orientation.h \
+	PointLocation.h \
 	PointLocator.h \
 	RayCrossingCounter.h \
 	RayCrossingCounterDD.h \
diff --git a/include/geos/algorithm/PointLocation.h b/include/geos/algorithm/PointLocation.h
new file mode 100644
index 0000000..7761d4c
--- /dev/null
+++ b/include/geos/algorithm/PointLocation.h
@@ -0,0 +1,105 @@
+/**********************************************************************
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.osgeo.org
+ *
+ * Copyright (C) 2018 Paul Ramsey <pramsey at cleverlephant.ca>
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation.
+ * See the COPYING file for more information.
+ *
+ **********************************************************************
+ *
+ * Last port: algorithm/PointLocation.java @ 2017-09-04
+ *
+ **********************************************************************/
+
+#ifndef GEOS_ALGORITHM_POINTLOCATION_H
+#define GEOS_ALGORITHM_POINTLOCATION_H
+
+#include <geos/export.h>
+#include <geos/geom/Coordinate.h>
+#include <geos/geom/CoordinateSequence.h>
+
+namespace geos {
+namespace algorithm { // geos::algorithm
+
+/**
+ * Functions for locating points within basic geometric
+ * structures such as lines and rings.
+ *
+ * @author Martin Davis
+ *
+ */
+class GEOS_DLL PointLocation {
+public:
+
+    /**
+    * Tests whether a point lies on the line defined by a list of
+    * coordinates.
+    *
+    * @param p the point to test
+    * @param line the line coordinates
+    * @return true if the point is a vertex of the line or lies in the interior
+    *         of a line segment in the line
+    */
+    //static bool isOnLine(const Coordinate &p, const std::vector<Coordinate> &line);
+
+    /**
+    * Tests whether a point lies on the line defined by a
+    * {@link CoordinateSequence}.
+    *
+    * @param p the point to test
+    * @param line the line coordinates
+    * @return true if the point is a vertex of the line or lies in the interior
+    *         of a line segment in the line
+    */
+    static bool isOnLine(const geom::Coordinate &p, const geom::CoordinateSequence *line);
+
+    /**
+    * Tests whether a point lies inside or on a ring. The ring may be oriented in
+    * either direction. A point lying exactly on the ring boundary is considered
+    * to be inside the ring.
+    *
+    * This method does *not* first check the point against the envelope of
+    * the ring.
+    *
+    * @param p
+    *          point to check for ring inclusion
+    * @param ring
+    *          an array of coordinates representing the ring (which must have
+    *          first point identical to last point)
+    * @return true if p is inside ring
+    *
+    * @see locatePointInRing
+    */
+    static bool isInRing(const geom::Coordinate &p, const std::vector<const geom::Coordinate*> &ring);
+    static bool isInRing(const geom::Coordinate &p, const geom::CoordinateSequence *ring);
+
+    /**
+    * Determines whether a point lies in the interior, on the boundary, or in the
+    * exterior of a ring. The ring may be oriented in either direction.
+    *
+    * This method does *not* first check the point against the envelope of
+    * the ring.
+    *
+    * @param p
+    *          point to check for ring inclusion
+    * @param ring
+    *          an array of coordinates representing the ring (which must have
+    *          first point identical to last point)
+    * @return the {@link Location} of p relative to the ring
+    */
+    static int locateInRing(const geom::Coordinate &p, const std::vector<const geom::Coordinate*> &ring);
+    static int locateInRing(const geom::Coordinate &p, const geom::CoordinateSequence &ring);
+
+};
+
+
+} // namespace geos::algorithm
+} // namespace geos
+
+
+#endif // GEOS_ALGORITHM_POINTLOCATION_H
diff --git a/include/geos/geosAlgorithm.h b/include/geos/geosAlgorithm.h
index d77d2b4..1b1224b 100644
--- a/include/geos/geosAlgorithm.h
+++ b/include/geos/geosAlgorithm.h
@@ -26,7 +26,6 @@
 #ifndef GEOS_ALGORITHM_H
 #define GEOS_ALGORITHM_H
 
-//#include <geos/algorithm/CGAlgorithms.h>
 //#include <geos/algorithm/ConvexHull.h>
 //#include <geos/algorithm/HCoordinate.h>
 //#include <geos/algorithm/InteriorPointArea.h>
diff --git a/include/geos/operation/buffer/BufferInputLineSimplifier.h b/include/geos/operation/buffer/BufferInputLineSimplifier.h
index 00ad99f..89d128d 100644
--- a/include/geos/operation/buffer/BufferInputLineSimplifier.h
+++ b/include/geos/operation/buffer/BufferInputLineSimplifier.h
@@ -20,7 +20,6 @@
 #define GEOS_OP_BUFFER_BUFFERINPUTLINESIMPLIFIER_H
 
 #include <geos/geom/CoordinateSequence.h> // complete type required
-#include <geos/algorithm/CGAlgorithms.h> // for enum
 
 #include <memory>
 #include <vector> // for composition
diff --git a/src/algorithm/Angle.cpp b/src/algorithm/Angle.cpp
index 2087b38..c05e758 100644
--- a/src/algorithm/Angle.cpp
+++ b/src/algorithm/Angle.cpp
@@ -19,7 +19,6 @@
 #include <cmath>
 
 #include <geos/algorithm/Angle.h>
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/geom/Coordinate.h>
 
 namespace geos {
diff --git a/src/algorithm/CGAlgorithmsDD.cpp b/src/algorithm/CGAlgorithmsDD.cpp
index 1f026e3..5022ee2 100644
--- a/src/algorithm/CGAlgorithmsDD.cpp
+++ b/src/algorithm/CGAlgorithmsDD.cpp
@@ -54,6 +54,9 @@ int CGAlgorithmsDD::orientationIndex(const Coordinate& p1,
                                      const Coordinate& p2,
                                      const Coordinate& q)
 {
+    if (ISNAN(q.x) || ISNAN(q.y) || !FINITE(q.x) || !FINITE(q.y)) {
+        throw util::IllegalArgumentException("CGAlgorithmsDD::orientationIndex encountered NaN/Inf numbers");
+    }
     static DD const zero(0.0);
     DD dx1 = DD(p2.x) + DD(-p1.x);
     DD dy1 = DD(p2.y) + DD(-p1.y);
diff --git a/src/algorithm/ConvexHull.cpp b/src/algorithm/ConvexHull.cpp
index 8da34c4..80a634b 100644
--- a/src/algorithm/ConvexHull.cpp
+++ b/src/algorithm/ConvexHull.cpp
@@ -19,7 +19,7 @@
  **********************************************************************/
 
 #include <geos/algorithm/ConvexHull.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/Orientation.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Coordinate.h>
@@ -203,7 +203,7 @@ ConvexHull::reduce(Coordinate::ConstVect &pts)
 	 */
 	for (size_t i=0, n=pts.size(); i<n; ++i)
 	{
-		if ( !CGAlgorithms::isPointInRing(*(pts[i]), polyPts) )
+		if ( !PointLocation::isInRing(*(pts[i]), polyPts) )
 		{
 			reducedSet.insert(pts[i]);
 		}
diff --git a/src/algorithm/LineIntersector.cpp b/src/algorithm/LineIntersector.cpp
index 0ca981a..61b7a47 100644
--- a/src/algorithm/LineIntersector.cpp
+++ b/src/algorithm/LineIntersector.cpp
@@ -20,6 +20,7 @@
 #include <geos/platform.h>
 #include <geos/algorithm/LineIntersector.h>
 #include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/HCoordinate.h>
 #include <geos/algorithm/NotRepresentableException.h>
 //#include <geos/algorithm/CentralEndpointIntersector.h>
@@ -337,8 +338,8 @@ LineIntersector::computeIntersection(const Coordinate& p,const Coordinate& p1,co
 
 	// do between check first, since it is faster than the orientation test
 	if(Envelope::intersects(p1,p2,p)) {
-		if ((CGAlgorithms::orientationIndex(p1,p2,p)==0)&&
-			(CGAlgorithms::orientationIndex(p2,p1,p)==0)) {
+		if ((Orientation::index(p1,p2,p)==0)&&
+			(Orientation::index(p2,p1,p)==0)) {
 			isProperVar=true;
 			if ((p==p1)||(p==p2)) // 2d only test
 			{
@@ -370,8 +371,8 @@ bool
 LineIntersector::hasIntersection(const Coordinate& p, const Coordinate& p1, const Coordinate& p2)
 {
 	if(Envelope::intersects(p1,p2,p)) {
-		if ((CGAlgorithms::orientationIndex(p1,p2,p)==0)&&
-			(CGAlgorithms::orientationIndex(p2,p1,p)==0)) {
+		if ((Orientation::index(p1,p2,p)==0)&&
+			(Orientation::index(p2,p1,p)==0)) {
 			return true;
 		}
 	}
@@ -401,8 +402,8 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 	// for each endpoint, compute which side of the other segment it lies
 	// if both endpoints lie on the same side of the other segment,
 	// the segments do not intersect
-	int Pq1=CGAlgorithms::orientationIndex(p1,p2,q1);
-	int Pq2=CGAlgorithms::orientationIndex(p1,p2,q2);
+	int Pq1=Orientation::index(p1,p2,q1);
+	int Pq2=Orientation::index(p1,p2,q2);
 
 	if ((Pq1>0 && Pq2>0) || (Pq1<0 && Pq2<0))
 	{
@@ -412,8 +413,8 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 		return NO_INTERSECTION;
 	}
 
-	int Qp1=CGAlgorithms::orientationIndex(q1,q2,p1);
-	int Qp2=CGAlgorithms::orientationIndex(q1,q2,p2);
+	int Qp1=Orientation::index(q1,q2,p1);
+	int Qp2=Orientation::index(q1,q2,p2);
 
 	if ((Qp1>0 && Qp2>0)||(Qp1<0 && Qp2<0)) {
 #if GEOS_DEBUG
diff --git a/src/algorithm/Makefile.am b/src/algorithm/Makefile.am
index 7c9f7f9..fc1a1bb 100644
--- a/src/algorithm/Makefile.am
+++ b/src/algorithm/Makefile.am
@@ -26,6 +26,7 @@ libalgorithm_la_SOURCES = \
 	MinimumDiameter.cpp \
 	NotRepresentableException.cpp \
 	Orientation.cpp \
+	PointLocation.cpp \
 	PointLocator.cpp \
 	RayCrossingCounter.cpp \
 	RayCrossingCounterDD.cpp \
diff --git a/src/algorithm/Orientation.cpp b/src/algorithm/Orientation.cpp
index dcedac0..13a7215 100644
--- a/src/algorithm/Orientation.cpp
+++ b/src/algorithm/Orientation.cpp
@@ -20,7 +20,6 @@
 #include <vector>
 
 #include <geos/algorithm/Orientation.h>
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/algorithm/CGAlgorithmsDD.h>
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/Coordinate.h>
diff --git a/src/algorithm/PointLocation.cpp b/src/algorithm/PointLocation.cpp
new file mode 100644
index 0000000..682c0c1
--- /dev/null
+++ b/src/algorithm/PointLocation.cpp
@@ -0,0 +1,87 @@
+/**********************************************************************
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.osgeo.org
+ *
+ * Copyright (C) 2018 Paul Ramsey <pramsey at cleverlephant.ca>
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation.
+ * See the COPYING file for more information.
+ *
+ **********************************************************************
+ *
+ * Last port: algorithm/PointLocation.java @ 2017-09-04
+ *
+ **********************************************************************/
+
+#include <cmath>
+#include <vector>
+
+#include <geos/algorithm/LineIntersector.h>
+#include <geos/algorithm/PointLocation.h>
+#include <geos/algorithm/RayCrossingCounter.h>
+#include <geos/geom/CoordinateSequence.h>
+#include <geos/geom/Coordinate.h>
+#include <geos/geom/Location.h>
+#include <geos/util/IllegalArgumentException.h>
+
+namespace geos {
+namespace algorithm { // geos.algorithm
+
+/* public static */
+bool
+PointLocation::isOnLine(const geom::Coordinate& p, const geom::CoordinateSequence* pt)
+{
+    size_t ptsize = pt->getSize();
+    if (ptsize == 0)
+        return false;
+
+    const geom::Coordinate *pp = &(pt->getAt(0));
+    for(size_t i = 1; i < ptsize; ++i)
+    {
+        const geom::Coordinate &p1 = pt->getAt(i);
+        if (LineIntersector::hasIntersection(p, *pp, p1))
+            return true;
+        pp = &p1;
+    }
+    return false;
+}
+
+/* public static */
+bool
+PointLocation::isInRing(const geom::Coordinate &p,
+                        const std::vector<const geom::Coordinate*> &ring)
+{
+    return PointLocation::locateInRing(p, ring) != geom::Location::EXTERIOR;
+}
+
+/* public static */
+bool
+PointLocation::isInRing(const geom::Coordinate &p,
+                        const geom::CoordinateSequence *ring)
+{
+    return PointLocation::locateInRing(p, *ring) != geom::Location::EXTERIOR;
+}
+
+/* public static */
+int
+PointLocation::locateInRing(const geom::Coordinate &p,
+                            const std::vector<const geom::Coordinate*> &ring)
+{
+    return RayCrossingCounter::locatePointInRing(p, ring);
+}
+
+/* public static */
+int
+PointLocation::locateInRing(const geom::Coordinate &p,
+                            const geom::CoordinateSequence &ring)
+{
+    return RayCrossingCounter::locatePointInRing(p, ring);
+}
+
+
+} // namespace geos.algorithm
+} // namespace geos
+
diff --git a/src/algorithm/PointLocator.cpp b/src/algorithm/PointLocator.cpp
index 448dd85..ff57507 100644
--- a/src/algorithm/PointLocator.cpp
+++ b/src/algorithm/PointLocator.cpp
@@ -18,7 +18,7 @@
  **********************************************************************/
 
 #include <geos/algorithm/PointLocator.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/Point.h>
 #include <geos/geom/LineString.h>
@@ -131,14 +131,15 @@ PointLocator::locate(const Coordinate& p, const LineString *l)
 	if (!l->getEnvelopeInternal()->intersects(p))
 		return Location::EXTERIOR;
 
-	const CoordinateSequence* pt=l->getCoordinatesRO();
+	const CoordinateSequence* seq = l->getCoordinatesRO();
 	if (! l->isClosed()) {
-		if ((p==pt->getAt(0)) || (p==pt->getAt(pt->getSize()-1))) {
+		if ((p == seq->getAt(0)) || (p == seq->getAt(seq->getSize()-1))) {
 			return Location::BOUNDARY;
 		}
 	}
-	if (CGAlgorithms::isOnLine(p,pt))
+	if (PointLocation::isOnLine(p, seq)) {
 		return Location::INTERIOR;
+    }
 	return Location::EXTERIOR;
 }
 
@@ -152,10 +153,12 @@ PointLocator::locateInPolygonRing(const Coordinate& p, const LinearRing *ring)
 
 	const CoordinateSequence *cl = ring->getCoordinatesRO();
 
-	if (CGAlgorithms::isOnLine(p,cl))
+	if (PointLocation::isOnLine(p,cl)) {
 		return Location::BOUNDARY;
-	if (CGAlgorithms::isPointInRing(p,cl))
+    }
+	if (PointLocation::isInRing(p,cl)) {
 		return Location::INTERIOR;
+    }
 	return Location::EXTERIOR;
 }
 
diff --git a/src/algorithm/SimplePointInRing.cpp b/src/algorithm/SimplePointInRing.cpp
index b4bf72c..b45a446 100644
--- a/src/algorithm/SimplePointInRing.cpp
+++ b/src/algorithm/SimplePointInRing.cpp
@@ -14,7 +14,7 @@
  **********************************************************************/
 
 #include <geos/algorithm/SimplePointInRing.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/geom/LinearRing.h>
 
 // Forward declarations
@@ -35,7 +35,7 @@ SimplePointInRing::~SimplePointInRing(){
 }
 
 bool SimplePointInRing::isInside(const geom::Coordinate& pt){
-	return CGAlgorithms::isPointInRing(pt,pts);
+	return PointLocation::isInRing(pt,pts);
 }
 
 } // namespace geos.algorithm
diff --git a/src/algorithm/distance/DiscreteHausdorffDistance.cpp b/src/algorithm/distance/DiscreteHausdorffDistance.cpp
index 7e8fc3b..745cc0f 100644
--- a/src/algorithm/distance/DiscreteHausdorffDistance.cpp
+++ b/src/algorithm/distance/DiscreteHausdorffDistance.cpp
@@ -19,13 +19,6 @@
 #include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
 #include <geos/geom/CoordinateSequence.h>
 
-//#include <geos/algorithm/CGAlgorithms.h>
-//#include <geos/geom/Geometry.h>
-//#include <geos/geom/Polygon.h>
-//#include <geos/geom/GeometryCollection.h>
-//#include <geos/geom/Location.h>
-//#include <geos/geom/LineString.h>
-
 #include <typeinfo>
 #include <cassert>
 
diff --git a/src/algorithm/locate/SimplePointInAreaLocator.cpp b/src/algorithm/locate/SimplePointInAreaLocator.cpp
index b20ef58..a5d1029 100644
--- a/src/algorithm/locate/SimplePointInAreaLocator.cpp
+++ b/src/algorithm/locate/SimplePointInAreaLocator.cpp
@@ -13,7 +13,7 @@
  *
  **********************************************************************/
 
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/locate/SimplePointInAreaLocator.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/Polygon.h>
@@ -73,7 +73,7 @@ SimplePointInAreaLocator::locatePointInPolygon(const Coordinate& p, const Polygo
     const LineString *shell=poly->getExteriorRing();
     const CoordinateSequence *cl;
     cl = shell->getCoordinatesRO();
-    int shellLoc = CGAlgorithms::locatePointInRing(p,*cl);
+    int shellLoc = PointLocation::locateInRing(p,*cl);
     if (shellLoc != Location::INTERIOR)
         return shellLoc;
 
@@ -82,7 +82,7 @@ SimplePointInAreaLocator::locatePointInPolygon(const Coordinate& p, const Polygo
     {
         const LineString *hole = poly->getInteriorRingN(i);
         cl = hole->getCoordinatesRO();
-        int holeLoc = CGAlgorithms::locatePointInRing(p,*cl);
+        int holeLoc = PointLocation::locateInRing(p,*cl);
         if (holeLoc == Location::BOUNDARY)
             return Location::BOUNDARY;
         if (holeLoc == Location::INTERIOR)
diff --git a/src/geom/GeometryCollection.cpp b/src/geom/GeometryCollection.cpp
index 3ead8fa..91cdd4d 100644
--- a/src/geom/GeometryCollection.cpp
+++ b/src/geom/GeometryCollection.cpp
@@ -18,7 +18,6 @@
  **********************************************************************/
 
 #include <geos/geom/GeometryCollection.h>
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/util/IllegalArgumentException.h>
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/CoordinateSequenceFilter.h>
diff --git a/src/geom/LineSegment.cpp b/src/geom/LineSegment.cpp
index 96f0fed..c7d29a2 100644
--- a/src/geom/LineSegment.cpp
+++ b/src/geom/LineSegment.cpp
@@ -24,7 +24,7 @@
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/CoordinateArraySequence.h> // should we really be using this?
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/LineIntersector.h>
 #include <geos/algorithm/HCoordinate.h>
 #include <geos/algorithm/NotRepresentableException.h>
@@ -165,8 +165,8 @@ LineSegment::equalsTopo(const LineSegment& other) const
 int
 LineSegment::orientationIndex(const LineSegment& seg) const
 {
-	int orient0 = algorithm::CGAlgorithms::orientationIndex(p0, p1, seg.p0);
-	int orient1 = algorithm::CGAlgorithms::orientationIndex(p0, p1, seg.p1);
+	int orient0 = algorithm::Orientation::index(p0, p1, seg.p0);
+	int orient1 = algorithm::Orientation::index(p0, p1, seg.p1);
 	// this handles the case where the points are L or collinear
 	if (orient0 >= 0 && orient1 >= 0)
 		return std::max(orient0, orient1);
diff --git a/src/geom/MultiLineString.cpp b/src/geom/MultiLineString.cpp
index 3aab661..5f875d3 100644
--- a/src/geom/MultiLineString.cpp
+++ b/src/geom/MultiLineString.cpp
@@ -18,7 +18,6 @@
  *
  **********************************************************************/
 
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/geomgraph/GeometryGraph.h>
 #include <geos/geom/MultiLineString.h>
 #include <geos/geom/LineString.h>
diff --git a/src/geomgraph/EdgeRing.cpp b/src/geomgraph/EdgeRing.cpp
index 1c602f8..aa60a1e 100644
--- a/src/geomgraph/EdgeRing.cpp
+++ b/src/geomgraph/EdgeRing.cpp
@@ -20,7 +20,7 @@
 
 #include <geos/util/Assert.h>
 #include <geos/util/TopologyException.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/Orientation.h>
 #include <geos/geomgraph/EdgeRing.h>
 #include <geos/geomgraph/DirectedEdge.h>
@@ -380,7 +380,7 @@ EdgeRing::containsPoint(const Coordinate& p)
 	assert(env);
 	if ( ! env->contains(p) ) return false;
 
-	if ( ! CGAlgorithms::isPointInRing(p, ring->getCoordinatesRO()) )
+	if ( ! PointLocation::isInRing(p, ring->getCoordinatesRO()) )
 		return false;
 
 	for (vector<EdgeRing*>::iterator i=holes.begin(); i<holes.end(); ++i)
diff --git a/src/operation/buffer/OffsetCurveBuilder.cpp b/src/operation/buffer/OffsetCurveBuilder.cpp
index 54b48ba..0bf5c35 100644
--- a/src/operation/buffer/OffsetCurveBuilder.cpp
+++ b/src/operation/buffer/OffsetCurveBuilder.cpp
@@ -22,7 +22,6 @@
 #include <cmath>
 #include <vector>
 
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/algorithm/Angle.h>
 #include <geos/operation/buffer/OffsetCurveBuilder.h>
 #include <geos/operation/buffer/BufferInputLineSimplifier.h>
diff --git a/src/operation/intersection/RectangleIntersection.cpp b/src/operation/intersection/RectangleIntersection.cpp
index 3178c46..217d250 100644
--- a/src/operation/intersection/RectangleIntersection.cpp
+++ b/src/operation/intersection/RectangleIntersection.cpp
@@ -12,7 +12,7 @@
  *
  **********************************************************************/
 
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/Orientation.h>
 #include <geos/operation/intersection/RectangleIntersection.h>
 #include <geos/operation/intersection/Rectangle.h>
@@ -35,6 +35,7 @@
 using geos::operation::intersection::Rectangle;
 using geos::operation::intersection::RectangleIntersectionBuilder;
 using namespace geos::geom;
+using namespace geos::algorithm;
 namespace geos {
 namespace operation { // geos::operation
 namespace intersection { // geos::operation::intersection
@@ -125,8 +126,6 @@ RectangleIntersection::clip_linestring_parts(const geom::LineString * gi,
 						   RectangleIntersectionBuilder & parts,
 						   const Rectangle & rect)
 {
-  using namespace geos::geom;
-
   auto n = gi->getNumPoints();
 
   if(gi == nullptr || n<1)
@@ -470,14 +469,13 @@ RectangleIntersection::clip_polygon_to_polygons(const geom::Polygon * g,
   // If there were no intersections, the outer ring might be
   // completely outside.
 
-  using geos::algorithm::CGAlgorithms;
   using geos::algorithm::Orientation;
   if( parts.empty() )
   {
     Coordinate rectCenter(rect.xmin(), rect.ymin());
     rectCenter.x += (rect.xmax()-rect.xmin())/2;
     rectCenter.y += (rect.ymax()-rect.ymin())/2;
-    if ( CGAlgorithms::locatePointInRing(rectCenter,
+    if ( PointLocation::locateInRing(rectCenter,
                           *g->getExteriorRing()->getCoordinatesRO())
          != Location::INTERIOR )
     {
@@ -525,11 +523,11 @@ RectangleIntersection::clip_polygon_to_polygons(const geom::Polygon * g,
 			}
 		  else
 			{
-        using geos::algorithm::CGAlgorithms;
+
         Coordinate rectCenter(rect.xmin(), rect.ymin());
         rectCenter.x += (rect.xmax()-rect.xmin())/2;
         rectCenter.y += (rect.ymax()-rect.ymin())/2;
-			  if( CGAlgorithms::isPointInRing(rectCenter,
+			  if( PointLocation::isInRing(rectCenter,
             g->getInteriorRingN(i)->getCoordinatesRO()) )
 				{
 				  // Completely inside the hole
diff --git a/src/operation/intersection/RectangleIntersectionBuilder.cpp b/src/operation/intersection/RectangleIntersectionBuilder.cpp
index a83ab0b..a80cb5e 100644
--- a/src/operation/intersection/RectangleIntersectionBuilder.cpp
+++ b/src/operation/intersection/RectangleIntersectionBuilder.cpp
@@ -21,7 +21,7 @@
 #include <geos/geom/Point.h>
 #include <geos/geom/LineString.h>
 #include <geos/geom/LinearRing.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/util/IllegalArgumentException.h>
 
 #include <cmath> // for fabs()
@@ -472,14 +472,14 @@ RectangleIntersectionBuilder::reconnectPolygons(const Rectangle & rect)
     }
 	  else
 		{
-      using geos::algorithm::CGAlgorithms;
+      using geos::algorithm::PointLocation;
 		  geom::Coordinate c;
 		  hole->getCoordinatesRO()->getAt(0, c);
       for (ShellAndHolesList::iterator p_i=exterior.begin(), p_e=exterior.end(); p_i!=p_e; ++p_i)
 			{
         ShellAndHoles &p = *p_i;
         const CoordinateSequence *shell_cs = p.first->getCoordinatesRO();
-        if( CGAlgorithms::isPointInRing(c, shell_cs) )
+        if( PointLocation::isInRing(c, shell_cs) )
         {
           // add hole to shell
           p.second->push_back(hole->clone());
diff --git a/src/operation/overlay/PolygonBuilder.cpp b/src/operation/overlay/PolygonBuilder.cpp
index f46bd52..f3ea383 100644
--- a/src/operation/overlay/PolygonBuilder.cpp
+++ b/src/operation/overlay/PolygonBuilder.cpp
@@ -28,7 +28,7 @@
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/LinearRing.h>
 #include <geos/geom/Polygon.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/util/TopologyException.h>
 #include <geos/util/GEOSException.h>
 #include <geos/util.h>
@@ -348,7 +348,7 @@ PolygonBuilder::findEdgeRingContaining(EdgeRing *testEr,
 		Coordinate testPt = operation::polygonize::EdgeRing::ptNotInList(testRing->getCoordinatesRO(), tsrcs);
 		bool isContained=false;
 
-		if(CGAlgorithms::isPointInRing(testPt, tsrcs))
+		if(PointLocation::isInRing(testPt, tsrcs))
 			isContained=true;
 
 		// check if this new containing ring is smaller than
diff --git a/src/operation/polygonize/EdgeRing.cpp b/src/operation/polygonize/EdgeRing.cpp
index 52503f1..437d302 100644
--- a/src/operation/polygonize/EdgeRing.cpp
+++ b/src/operation/polygonize/EdgeRing.cpp
@@ -26,7 +26,7 @@
 #include <geos/geom/Envelope.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/CoordinateSequenceFactory.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/Orientation.h>
 #include <geos/util/IllegalArgumentException.h>
 #include <geos/util.h> // TODO: drop this, includes too much
@@ -78,7 +78,7 @@ EdgeRing::findEdgeRingContaining(EdgeRing *testEr,
             // TODO: don't copy testPt !
             testPt = ptNotInList(testRing->getCoordinatesRO(), tryCoords);
 
-            if ( CGAlgorithms::isPointInRing(testPt, tryCoords) ) {
+            if ( PointLocation::isInRing(testPt, tryCoords) ) {
                 isContained=true;
             }
 
diff --git a/src/operation/valid/IndexedNestedRingTester.cpp b/src/operation/valid/IndexedNestedRingTester.cpp
index 16c3886..c0bd588 100644
--- a/src/operation/valid/IndexedNestedRingTester.cpp
+++ b/src/operation/valid/IndexedNestedRingTester.cpp
@@ -19,7 +19,7 @@
 #include "IndexedNestedRingTester.h"
 
 #include <geos/geom/LinearRing.h> // for use
-#include <geos/algorithm/CGAlgorithms.h> // for use
+#include <geos/algorithm/PointLocation.h> // for use
 #include <geos/operation/valid/IsValidOp.h> // for use (findPtNotNode)
 #include <geos/index/strtree/STRtree.h> // for use
 
@@ -81,7 +81,7 @@ IndexedNestedRingTester::isNonNested()
 			// the search ring
 			assert(innerRingPt!=nullptr);
 
-			bool isInside = algorithm::CGAlgorithms::isPointInRing(
+			bool isInside = algorithm::PointLocation::isInRing(
 					*innerRingPt, searchRingPts);
 
 			if (isInside) {
diff --git a/src/operation/valid/IsValidOp.cpp b/src/operation/valid/IsValidOp.cpp
index a77732f..c7a3d18 100644
--- a/src/operation/valid/IsValidOp.cpp
+++ b/src/operation/valid/IsValidOp.cpp
@@ -23,8 +23,8 @@
 
 #include <geos/export.h>
 #include <geos/platform.h>
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/algorithm/LineIntersector.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
 #include <geos/operation/valid/ConnectedInteriorTester.h>
 #include <geos/operation/valid/ConsistentAreaTester.h>
@@ -506,7 +506,7 @@ IsValidOp::checkShellNotNested(const LinearRing *shell, const Polygon *p,
     // is outside the polygon
     if (shellPt==nullptr) return;
 
-    bool insidePolyShell=CGAlgorithms::isPointInRing(*shellPt, polyPts);
+    bool insidePolyShell=PointLocation::isInRing(*shellPt, polyPts);
     if (!insidePolyShell) return;
 
     // if no holes, this is an error!
@@ -555,7 +555,7 @@ IsValidOp::checkShellInsideHole(const LinearRing *shell,
     // if point is on shell but not hole, check that the shell is
     // inside the hole
     if (shellPt) {
-        bool insideHole=CGAlgorithms::isPointInRing(*shellPt, holePts);
+        bool insideHole=PointLocation::isInRing(*shellPt, holePts);
         if (!insideHole) return shellPt;
     }
 
@@ -564,7 +564,7 @@ IsValidOp::checkShellInsideHole(const LinearRing *shell,
     // if point is on hole but not shell, check that the hole is
     // outside the shell
     if (holePt) {
-        bool insideShell=CGAlgorithms::isPointInRing(*holePt, shellPts);
+        bool insideShell=PointLocation::isInRing(*holePt, shellPts);
         if (insideShell) return holePt;
         return nullptr;
     }
diff --git a/src/operation/valid/QuadtreeNestedRingTester.cpp b/src/operation/valid/QuadtreeNestedRingTester.cpp
index 897bba5..e8889e5 100644
--- a/src/operation/valid/QuadtreeNestedRingTester.cpp
+++ b/src/operation/valid/QuadtreeNestedRingTester.cpp
@@ -20,7 +20,7 @@
 
 #include <geos/operation/valid/QuadtreeNestedRingTester.h>
 #include <geos/operation/valid/IsValidOp.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/geom/Envelope.h>
 #include <geos/geom/LinearRing.h>
 #include <geos/index/quadtree/Quadtree.h>
@@ -97,7 +97,7 @@ QuadtreeNestedRingTester::isNonNested()
 			// Unable to find a ring point not a node of the search ring
 			assert(innerRingPt!=nullptr);
 
-			bool isInside=CGAlgorithms::isPointInRing(*innerRingPt,searchRingPts);
+			bool isInside=PointLocation::isInRing(*innerRingPt,searchRingPts);
 			if (isInside) {
 				/*
 				 * innerRingPt is const just because the input
diff --git a/src/operation/valid/SimpleNestedRingTester.cpp b/src/operation/valid/SimpleNestedRingTester.cpp
index 7f23044..31aa8f0 100644
--- a/src/operation/valid/SimpleNestedRingTester.cpp
+++ b/src/operation/valid/SimpleNestedRingTester.cpp
@@ -19,7 +19,7 @@
 
 #include <geos/operation/valid/SimpleNestedRingTester.h>
 #include <geos/operation/valid/IsValidOp.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/geom/LinearRing.h>
 #include <geos/geom/Envelope.h>
 
@@ -49,7 +49,7 @@ SimpleNestedRingTester::isNonNested()
 			// Unable to find a ring point not a node of the search ring
 			assert(innerRingPt!=nullptr);
 
-			bool isInside=CGAlgorithms::isPointInRing(*innerRingPt,searchRingPts);
+			bool isInside=PointLocation::isInRing(*innerRingPt,searchRingPts);
 			if (isInside) {
 				/*
 				 * innerRingPt is const just because the input
diff --git a/src/operation/valid/SweeplineNestedRingTester.cpp b/src/operation/valid/SweeplineNestedRingTester.cpp
index d72821f..298f66e 100644
--- a/src/operation/valid/SweeplineNestedRingTester.cpp
+++ b/src/operation/valid/SweeplineNestedRingTester.cpp
@@ -21,7 +21,7 @@
 #include <geos/operation/valid/IsValidOp.h>
 #include <geos/index/sweepline/SweepLineInterval.h>
 #include <geos/index/sweepline/SweepLineIndex.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/geom/LinearRing.h>
 
 #include <cassert>
@@ -85,7 +85,7 @@ SweeplineNestedRingTester::isInside(LinearRing *innerRing,LinearRing *searchRing
 	// Unable to find a ring point not a node of the search ring
 	assert(innerRingPt!=nullptr);
 
-	bool p_isInside=CGAlgorithms::isPointInRing(*innerRingPt,searchRingPts);
+	bool p_isInside = PointLocation::isInRing(*innerRingPt,searchRingPts);
 	if (p_isInside) {
 		/*
 		 * innerRingPt is const just because the input
diff --git a/tests/unit/algorithm/CGAlgorithms/isPointInRingTest.cpp b/tests/unit/algorithm/CGAlgorithms/isPointInRingTest.cpp
index 2e62f85..2007ae3 100644
--- a/tests/unit/algorithm/CGAlgorithms/isPointInRingTest.cpp
+++ b/tests/unit/algorithm/CGAlgorithms/isPointInRingTest.cpp
@@ -1,10 +1,10 @@
 //
-// Test Suite for CGAlgorithms::isPointInRing() function
+// Test Suite for PointLocation::isInRing() function
 
 // tut
 #include <tut/tut.hpp>
 // geos
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/geom/Polygon.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/CoordinateSequence.h>
@@ -45,7 +45,7 @@ namespace tut
     typedef test_group<test_ispointinring_data> group;
     typedef group::object object;
 
-    group test_ispointintring_group("geos::algorithm::CGAlgorithms::isPointInRing");
+    group test_ispointintring_group("geos::algorithm::PointLocation::isInRing");
 
     //
     // Test Cases
@@ -62,7 +62,7 @@ namespace tut
         geos::geom::Coordinate pt(10, 10);
 
         cs_ = geom->getCoordinates();
-        bool isInRing = CGAlgorithms::isPointInRing(pt, cs_);
+        bool isInRing = PointLocation::isInRing(pt, cs_);
 
         ensure_equals( true, isInRing );
     }
@@ -80,7 +80,7 @@ namespace tut
         geos::geom::Coordinate pt(0, 0);
 
         cs_ = geom->getCoordinates();
-        bool isInRing = CGAlgorithms::isPointInRing(pt, cs_);
+        bool isInRing = PointLocation::isInRing(pt, cs_);
 
         ensure_equals( true, isInRing );
     }
diff --git a/tests/unit/algorithm/CGAlgorithms/signedAreaTest.cpp b/tests/unit/algorithm/CGAlgorithms/signedAreaTest.cpp
index c5d1aba..0f9718a 100644
--- a/tests/unit/algorithm/CGAlgorithms/signedAreaTest.cpp
+++ b/tests/unit/algorithm/CGAlgorithms/signedAreaTest.cpp
@@ -1,10 +1,10 @@
 //
-// Test Suite for CGAlgorithms::signedArea() function
+// Test Suite for Area::ofRingSigned() function
 
 // tut
 #include <tut/tut.hpp>
 // geos
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Area.h>
 #include <geos/geom/Polygon.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/CoordinateSequence.h>
@@ -49,7 +49,7 @@ namespace tut
     typedef test_group<test_signedarea_data> group;
     typedef group::object object;
 
-    group test_signedarea_group("geos::algorithm::CGAlgorithms::signedArea");
+    group test_signedarea_group("geos::algorithm::Area::ofRingSigned");
 
     //
     // Test Cases
@@ -64,7 +64,7 @@ namespace tut
         GeometryPtr geom(reader_.read(wkt));
 
         cs_ = geom->getCoordinates();
-        double area = CGAlgorithms::signedArea(cs_);
+        double area = Area::ofRingSigned(cs_);
 
         ensure_equals( area, 8400 );
     }
@@ -78,7 +78,7 @@ namespace tut
         GeometryPtr geom(reader_.read(wkt));
 
         cs_ = geom->getCoordinates();
-        double area = CGAlgorithms::signedArea(cs_);
+        double area = Area::ofRingSigned(cs_);
 
         ensure_equals( area, -2400 );
     }
@@ -92,7 +92,7 @@ namespace tut
 		GeometryPtr geom(reader_.read(wkt));
 
         cs_ = geom->getCoordinates();
-        double area = CGAlgorithms::signedArea(cs_);
+        double area = Area::ofRingSigned(cs_);
 
         ensure_equals( area, -2400 );
     }
diff --git a/tests/unit/algorithm/LocatePointInRingTest.cpp b/tests/unit/algorithm/LocatePointInRingTest.cpp
index fe0f61e..49c054f 100644
--- a/tests/unit/algorithm/LocatePointInRingTest.cpp
+++ b/tests/unit/algorithm/LocatePointInRingTest.cpp
@@ -6,7 +6,7 @@
 // geos
 #include <geos/io/WKTReader.h>
 #include <geos/algorithm/PointLocator.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/RayCrossingCounterDD.h>
 #include <geos/geom/PrecisionModel.h>
 #include <geos/geom/GeometryFactory.h>
@@ -56,7 +56,7 @@ namespace tut
         std::unique_ptr<Geometry> geom(reader.read(wkt));
         const Polygon *poly = dynamic_cast<Polygon*>(geom.get());
         const CoordinateSequence* cs = poly->getExteriorRing()->getCoordinatesRO();
-		int loc = CGAlgorithms::locatePointInRing(pt, *cs);
+		int loc = PointLocation::locateInRing(pt, *cs);
 		ensure_equals(loc, expected);
 	}
 
diff --git a/tests/unit/algorithm/OrientationIndexFailureTest.cpp b/tests/unit/algorithm/OrientationIndexFailureTest.cpp
index 47668b1..ddd20c2 100644
--- a/tests/unit/algorithm/OrientationIndexFailureTest.cpp
+++ b/tests/unit/algorithm/OrientationIndexFailureTest.cpp
@@ -1,12 +1,11 @@
 //
-// Test Suite for geos::algorithm::CGAlgorithmsDD
+// Test Suite for geos::algorithm::Orientation
 // Ported from JTS junit/algorithm/OrientationIndexFailureTest.java
 
 #include <tut/tut.hpp>
 // geos
 #include <geos/geom/Coordinate.h>
-#include <geos/algorithm/CGAlgorithms.h>
-#include <geos/algorithm/CGAlgorithmsDD.h>
+#include <geos/algorithm/Orientation.h>
 // std
 #include <sstream>
 #include <string>
@@ -31,10 +30,10 @@ namespace tut
 
 	static int checkOrientation(Coordinate &c1, Coordinate &c2, Coordinate &c3)
 	{
-		int orient0 = CGAlgorithmsDD::orientationIndex(c1, c2, c3);
-    int orient1 = CGAlgorithmsDD::orientationIndex(c2, c3, c1);
-    int orient2 = CGAlgorithmsDD::orientationIndex(c3, c1, c2);
-    return (orient0 == orient1) && (orient0 == orient2);
+        int orient0 = Orientation::index(c1, c2, c3);
+        int orient1 = Orientation::index(c2, c3, c1);
+        int orient2 = Orientation::index(c3, c1, c2);
+        return (orient0 == orient1) && (orient0 == orient2);
 	}
 
 
diff --git a/tests/unit/algorithm/RobustLineIntersectorTest.cpp b/tests/unit/algorithm/RobustLineIntersectorTest.cpp
index f57ab91..68763ac 100644
--- a/tests/unit/algorithm/RobustLineIntersectorTest.cpp
+++ b/tests/unit/algorithm/RobustLineIntersectorTest.cpp
@@ -6,7 +6,7 @@
 #include <geos/io/WKBReader.h>
 #include <geos/io/WKTReader.h>
 #include <geos/algorithm/LineIntersector.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/Orientation.h>
 #include <geos/geom/PrecisionModel.h>
 #include <geos/geom/GeometryFactory.h>
@@ -24,7 +24,7 @@
 
 using namespace geos::geom; //
 using geos::algorithm::LineIntersector;
-using geos::algorithm::CGAlgorithms;
+using geos::algorithm::PointLocation;
 using geos::algorithm::Orientation;
 
 
@@ -244,7 +244,7 @@ namespace tut
     GeomPtr p ( factory->createPoint(q) );
     ensure(!l->intersects(p.get()));
 
-    ensure(!CGAlgorithms::isOnLine(q, cs));
+    ensure(!PointLocation::isOnLine(q, cs));
     ensure_equals(Orientation::index(p1, p2, q), -1);
 
 	}

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

Summary of changes:
 capi/geos_ts_c.cpp                                 |   6 +-
 include/geos/algorithm/Angle.h                     |   8 +-
 include/geos/algorithm/Makefile.am                 |   1 +
 include/geos/algorithm/PointLocation.h             | 105 +++++++++++++++++++++
 include/geos/geosAlgorithm.h                       |   1 -
 .../operation/buffer/BufferInputLineSimplifier.h   |   1 -
 src/algorithm/Angle.cpp                            |   1 -
 src/algorithm/CGAlgorithmsDD.cpp                   |   3 +
 src/algorithm/ConvexHull.cpp                       |   4 +-
 src/algorithm/LineIntersector.cpp                  |  17 ++--
 src/algorithm/Makefile.am                          |   1 +
 src/algorithm/Orientation.cpp                      |   1 -
 src/algorithm/PointLocation.cpp                    |  87 +++++++++++++++++
 src/algorithm/PointLocator.cpp                     |  15 +--
 src/algorithm/SimplePointInRing.cpp                |   4 +-
 .../distance/DiscreteHausdorffDistance.cpp         |   7 --
 src/algorithm/locate/SimplePointInAreaLocator.cpp  |   6 +-
 src/geom/GeometryCollection.cpp                    |   1 -
 src/geom/LineSegment.cpp                           |   6 +-
 src/geom/MultiLineString.cpp                       |   1 -
 src/geomgraph/EdgeRing.cpp                         |   4 +-
 src/operation/buffer/OffsetCurveBuilder.cpp        |   1 -
 .../intersection/RectangleIntersection.cpp         |  12 +--
 .../intersection/RectangleIntersectionBuilder.cpp  |   6 +-
 src/operation/overlay/PolygonBuilder.cpp           |   4 +-
 src/operation/polygonize/EdgeRing.cpp              |   4 +-
 src/operation/valid/IndexedNestedRingTester.cpp    |   4 +-
 src/operation/valid/IsValidOp.cpp                  |   8 +-
 src/operation/valid/QuadtreeNestedRingTester.cpp   |   4 +-
 src/operation/valid/SimpleNestedRingTester.cpp     |   4 +-
 src/operation/valid/SweeplineNestedRingTester.cpp  |   4 +-
 .../algorithm/CGAlgorithms/isPointInRingTest.cpp   |  10 +-
 .../unit/algorithm/CGAlgorithms/signedAreaTest.cpp |  12 +--
 tests/unit/algorithm/LocatePointInRingTest.cpp     |   4 +-
 .../unit/algorithm/OrientationIndexFailureTest.cpp |  13 ++-
 tests/unit/algorithm/RobustLineIntersectorTest.cpp |   6 +-
 36 files changed, 280 insertions(+), 96 deletions(-)
 create mode 100644 include/geos/algorithm/PointLocation.h
 create mode 100644 src/algorithm/PointLocation.cpp


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list