[geos-commits] [SCM] GEOS branch master updated. 691ea75810a806bd860eb921ff560827275a06a3

git at osgeo.org git at osgeo.org
Mon Dec 17 15:58:41 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  691ea75810a806bd860eb921ff560827275a06a3 (commit)
      from  002bfbeedfb21ad217e90f237f3149dcfd9b7786 (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 691ea75810a806bd860eb921ff560827275a06a3
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Dec 17 15:58:27 2018 -0800

    Move CGAlgorithms functions into Orientation class
    JTS 4c4ccd7fe5c758abb48647da60dacf8e4cd7f9df

diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index e824b15..383e468 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -43,11 +43,12 @@
 #include <geos/io/WKBReader.h>
 #include <geos/io/WKTWriter.h>
 #include <geos/io/WKBWriter.h>
-#include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
-#include <geos/algorithm/distance/DiscreteFrechetDistance.h>
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/algorithm/BoundaryNodeRule.h>
+#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/algorithm/MinimumDiameter.h>
+#include <geos/algorithm/Orientation.h>
+#include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
+#include <geos/algorithm/distance/DiscreteFrechetDistance.h>
 #include <geos/simplify/DouglasPeuckerSimplifier.h>
 #include <geos/simplify/TopologyPreservingSimplifier.h>
 #include <geos/noding/GeometryNoder.h>
@@ -4265,7 +4266,7 @@ GEOSCoordSeq_isCCW_r(GEOSContextHandle_t extHandle, const CoordinateSequence *cs
     }
     try
     {
-        *val = geos::algorithm::CGAlgorithms::isCCW(cs);
+        *val = geos::algorithm::Orientation::isCCW(cs);
         return 1;
     }
     catch (const std::exception &e)
diff --git a/include/geos/algorithm/Makefile.am b/include/geos/algorithm/Makefile.am
index 2791033..113c1fb 100644
--- a/include/geos/algorithm/Makefile.am
+++ b/include/geos/algorithm/Makefile.am
@@ -27,6 +27,7 @@ geos_HEADERS = \
 	Length.h \
 	MinimumDiameter.h \
 	NotRepresentableException.h \
+	Orientation.h \
 	PointLocator.h \
 	RayCrossingCounter.h \
 	RayCrossingCounterDD.h \
diff --git a/include/geos/algorithm/Orientation.h b/include/geos/algorithm/Orientation.h
new file mode 100644
index 0000000..e0ac45b
--- /dev/null
+++ b/include/geos/algorithm/Orientation.h
@@ -0,0 +1,91 @@
+/**********************************************************************
+ *
+ * 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/Orientation.java @ 2017-09-04
+ *
+ **********************************************************************/
+
+#ifndef GEOS_ALGORITHM_ORIENTATION_H
+#define GEOS_ALGORITHM_ORIENTATION_H
+
+#include <geos/export.h>
+#include <geos/geom/Coordinate.h>
+#include <geos/geom/CoordinateSequence.h>
+
+namespace geos {
+namespace algorithm { // geos::algorithm
+
+/**
+* Functions to compute the orientation of points, lines and rings.
+*
+* @author Martin Davis
+*
+*/
+class GEOS_DLL Orientation {
+public:
+
+    /* A value that indicates an orientation or turn */
+    enum {
+        CLOCKWISE=-1,
+        COLLINEAR=0,
+        COUNTERCLOCKWISE=1,
+        RIGHT=-1,
+        LEFT=1,
+        STRAIGHT=0
+    };
+
+    /*
+    * Returns the index of the direction of the point <code>q</code>
+    * relative to a vector specified by <code>p1-p2</code>.
+    *
+    * @param p1 the origin point of the vector
+    * @param p2 the final point of the vector
+    * @param q the point to compute the direction to
+    *
+    * @return 1 if q is counter-clockwise (left) from p1-p2
+    * @return -1 if q is clockwise (right) from p1-p2
+    * @return 0 if q is collinear with p1-p2
+    */
+    static int index(const geom::Coordinate &p1,
+                     const geom::Coordinate &p2, const geom::Coordinate &q);
+
+    /**
+    * Computes whether a ring defined by an array of {@link Coordinate}s is
+    * oriented counter-clockwise.
+    * <ul>
+    * <li>The list of points is assumed to have the first and last points equal.
+    * <li>This will handle coordinate lists which contain repeated points.
+    * </ul>
+    * This algorithm is <b>only</b> guaranteed to work with valid rings. If the
+    * ring is invalid (e.g. self-crosses or touches), the computed result may not
+    * be correct.
+    *
+    * @param ring
+    *          an array of Coordinates forming a ring
+    * @return true if the ring is oriented counter-clockwise.
+    * @throws IllegalArgumentException
+    *           if there are too few points to determine orientation (< 4)
+    */
+    static bool isCCW(const geom::CoordinateSequence* ring);
+
+
+
+};
+
+
+} // namespace geos::algorithm
+} // namespace geos
+
+
+#endif // GEOS_ALGORITHM_ORIENTATION_H
diff --git a/include/geos/geom/LineSegment.h b/include/geos/geom/LineSegment.h
index 5f5bc58..3c3bf02 100644
--- a/include/geos/geom/LineSegment.h
+++ b/include/geos/geom/LineSegment.h
@@ -130,7 +130,7 @@ public:
 	 * relative to this segment.
 	 *
 	 * The orientation index is as defined in
-	 * CGAlgorithms::computeOrientation.
+	 * Orientation::index.
 	 *
 	 * @param seg the LineSegment to compare
 	 *
@@ -138,7 +138,7 @@ public:
 	 * @return -1 if <code>p</code> is to the right of this segment
 	 * @return 0 if <code>p</code> is collinear with this segment
 	 *
-	 * @see CGAlgorithms::computeOrientation(Coordinate, Coordinate,
+	 * @see Orientation::index(Coordinate, Coordinate,
 	 *                                       Coordinate)
 	 */
 	int orientationIndex(const Coordinate& p) const;
diff --git a/include/geos/geom/util/GeometryTransformer.h b/include/geos/geom/util/GeometryTransformer.h
index cff3ea0..c26ac56 100644
--- a/include/geos/geom/util/GeometryTransformer.h
+++ b/include/geos/geom/util/GeometryTransformer.h
@@ -173,7 +173,7 @@ private:
 	/**
 	 * <code>true</code> if the output from a collection argument should still be a collection
 	 */
-	bool preserveCollections;
+	// bool preserveCollections;
 
 	/**
 	 * <code>true</code> if the type of the input should be preserved
diff --git a/include/geos/planargraph/DirectedEdge.h b/include/geos/planargraph/DirectedEdge.h
index d45dda8..25944ec 100644
--- a/include/geos/planargraph/DirectedEdge.h
+++ b/include/geos/planargraph/DirectedEdge.h
@@ -187,7 +187,7 @@ public:
 	 *   If the quadrants are different, it it
 	 *   trivial to determine which std::vector is "greater".
 	 * - if the vectors lie in the same quadrant, the robust
-	 *   RobustCGAlgorithms::computeOrientation(Coordinate, Coordinate, Coordinate)
+	 *   Orientation::index(Coordinate, Coordinate, Coordinate)
 	 *   function can be used to decide the relative orientation of
 	 *   the vectors.
 	 *
@@ -208,7 +208,7 @@ public:
 	 *   If the quadrants are different, it it trivial to determine
 	 *   which std::vector is "greater".
 	 * - if the vectors lie in the same quadrant, the robust
-	 *   RobustCGAlgorithms::computeOrientation(Coordinate, Coordinate, Coordinate)
+	 *   Orientation::index(Coordinate, Coordinate, Coordinate)
 	 *   function can be used to decide the relative orientation of
 	 *   the vectors.
 	 *
diff --git a/src/algorithm/Centroid.cpp b/src/algorithm/Centroid.cpp
index c5f31ab..f217420 100644
--- a/src/algorithm/Centroid.cpp
+++ b/src/algorithm/Centroid.cpp
@@ -17,7 +17,7 @@
  **********************************************************************/
 
 #include <geos/algorithm/Centroid.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/Point.h>
@@ -110,7 +110,7 @@ Centroid::addShell(const CoordinateSequence& pts)
   size_t len = pts.size();
   if (len > 0)
     setAreaBasePoint(pts[0]);
-  bool isPositiveArea = ! CGAlgorithms::isCCW(&pts);
+  bool isPositiveArea = ! Orientation::isCCW(&pts);
   for (size_t i = 0; i < len - 1; ++i) {
     addTriangle(*areaBasePt, pts[i], pts[i+1], isPositiveArea);
   }
@@ -121,7 +121,7 @@ Centroid::addShell(const CoordinateSequence& pts)
 void
 Centroid::addHole(const CoordinateSequence& pts)
 {
-  bool isPositiveArea = CGAlgorithms::isCCW(&pts);
+  bool isPositiveArea = Orientation::isCCW(&pts);
   for (size_t i = 0, e = pts.size() - 1; i < e; ++i) {
     addTriangle(*areaBasePt, pts[i], pts[i+1], isPositiveArea);
   }
diff --git a/src/algorithm/ConvexHull.cpp b/src/algorithm/ConvexHull.cpp
index 636cce8..8da34c4 100644
--- a/src/algorithm/ConvexHull.cpp
+++ b/src/algorithm/ConvexHull.cpp
@@ -20,6 +20,7 @@
 
 #include <geos/algorithm/ConvexHull.h>
 #include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/Point.h>
@@ -62,11 +63,11 @@ private:
 		double dxq=q->x-o->x;
 		double dyq=q->y-o->y;
 
-		int orient = CGAlgorithms::computeOrientation(*o, *p, *q);
+		int orient = Orientation::index(*o, *p, *q);
 
 
-		if (orient == CGAlgorithms::COUNTERCLOCKWISE) return 1;
-		if (orient == CGAlgorithms::CLOCKWISE) return -1;
+		if (orient == Orientation::COUNTERCLOCKWISE) return 1;
+		if (orient == Orientation::CLOCKWISE) return -1;
 
 		// points are collinear - check distance
 		double op = dxp * dxp + dyp * dyp;
@@ -302,7 +303,7 @@ ConvexHull::grahamScan(const Coordinate::ConstVect &c,
 	{
 		const Coordinate *p = ps.back(); ps.pop_back();
 		while (!ps.empty() &&
-			CGAlgorithms::computeOrientation(
+			Orientation::index(
 		    *(ps.back()), *p, *(c[i])) > 0)
 		{
 			p = ps.back(); ps.pop_back();
@@ -418,7 +419,7 @@ ConvexHull::grahamScan(const Coordinate::ConstVect &c,
 bool
 ConvexHull::isBetween(const Coordinate &c1, const Coordinate &c2, const Coordinate &c3)
 {
-	if (CGAlgorithms::computeOrientation(c1, c2, c3)!=0) {
+	if (Orientation::index(c1, c2, c3)!=0) {
 		return false;
 	}
 	if (c1.x!=c3.x) {
diff --git a/src/algorithm/Makefile.am b/src/algorithm/Makefile.am
index d316f85..7c9f7f9 100644
--- a/src/algorithm/Makefile.am
+++ b/src/algorithm/Makefile.am
@@ -25,6 +25,7 @@ libalgorithm_la_SOURCES = \
 	Length.cpp \
 	MinimumDiameter.cpp \
 	NotRepresentableException.cpp \
+	Orientation.cpp \
 	PointLocator.cpp \
 	RayCrossingCounter.cpp \
 	RayCrossingCounterDD.cpp \
diff --git a/src/algorithm/Orientation.cpp b/src/algorithm/Orientation.cpp
new file mode 100644
index 0000000..dcedac0
--- /dev/null
+++ b/src/algorithm/Orientation.cpp
@@ -0,0 +1,131 @@
+/**********************************************************************
+ *
+ * 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/Orientation.java @ 2017-09-04
+ *
+ **********************************************************************/
+
+#include <cmath>
+#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>
+#include <geos/geom/Location.h>
+#include <geos/util/IllegalArgumentException.h>
+
+namespace geos {
+namespace algorithm { // geos.algorithm
+
+/* public static */
+int
+Orientation::index(const geom::Coordinate &p1,
+                   const geom::Coordinate &p2, const geom::Coordinate &q)
+{
+    return CGAlgorithmsDD::orientationIndex(p1, p2, q);
+}
+
+/* public static */
+bool
+Orientation::isCCW(const geom::CoordinateSequence *ring)
+{
+    // sanity check
+    if (ring->getSize() < 4)
+    {
+        throw util::IllegalArgumentException("Ring has fewer than 3 points, so orientation cannot be determined");
+    }
+
+    // # of points without closing endpoint
+    const std::size_t nPts=ring->getSize()-1;
+
+    // find highest point
+    const geom::Coordinate *hiPt=&ring->getAt(0);
+    size_t hiIndex = 0;
+    for (std::size_t i = 1; i <= nPts; ++i)
+    {
+        const geom::Coordinate *p=&ring->getAt(i);
+        if (p->y > hiPt->y) {
+            hiPt = p;
+            hiIndex = i;
+        }
+    }
+
+    // find distinct point before highest point
+    auto iPrev = hiIndex;
+    do {
+        if (iPrev == 0)
+            iPrev = nPts;
+        iPrev = iPrev - 1;
+    } while (ring->getAt(iPrev) == *hiPt && iPrev != hiIndex);
+
+    // find distinct point after highest point
+    auto iNext = hiIndex;
+    do {
+        iNext = (iNext + 1) % nPts;
+    } while (ring->getAt(iNext)==*hiPt && iNext != hiIndex);
+
+    const geom::Coordinate *prev=&ring->getAt(iPrev);
+    const geom::Coordinate *next=&ring->getAt(iNext);
+
+    /*
+     * This check catches cases where the ring contains an A-B-A
+     * configuration of points.
+     * This can happen if the ring does not contain 3 distinct points
+     * (including the case where the input array has fewer than 4 elements),
+     * or it contains coincident line segments.
+     */
+    if ( prev->equals2D(*hiPt) || next->equals2D(*hiPt) ||
+        prev->equals2D(*next) )
+    {
+        return false;
+        // MD - don't bother throwing exception,
+        // since this isn't a complete check for ring validity
+        //throw  IllegalArgumentException("degenerate ring (does not contain 3 distinct points)");
+    }
+
+    // New DD high precision implementation
+    int disc = Orientation::index(*prev, *hiPt, *next);
+    // Old double implementation
+    // int disc = CGAlgorithms::computeOrientation(*prev, *hiPt, *next);
+
+    /**
+     *  If disc is exactly 0, lines are collinear.
+     * There are two possible cases:
+     *  (1) the lines lie along the x axis in opposite directions
+     *  (2) the lines lie on top of one another
+     *
+     *  (1) is handled by checking if next is left of prev ==> CCW
+     *  (2) should never happen, so we're going to ignore it!
+     *  (Might want to assert this)
+     */
+    bool isCCW=false;
+
+    if (disc == 0) {
+        // poly is CCW if prev x is right of next x
+        isCCW = (prev->x > next->x);
+    } else {
+        // if area is positive, points are ordered CCW
+        isCCW = (disc > 0);
+    }
+
+    return isCCW;
+}
+
+
+
+} // namespace geos.algorithm
+} //namespace geos
+
diff --git a/src/geom/Polygon.cpp b/src/geom/Polygon.cpp
index 7b8fea5..7d5dfbf 100644
--- a/src/geom/Polygon.cpp
+++ b/src/geom/Polygon.cpp
@@ -19,7 +19,7 @@
  **********************************************************************/
 
 #include <geos/algorithm/Area.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/util/IllegalArgumentException.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/Polygon.h>
@@ -346,7 +346,7 @@ Polygon::normalize(LinearRing *ring, bool clockwise)
 	const Coordinate* minCoordinate=CoordinateSequence::minCoordinate(uniqueCoordinates);
 	CoordinateSequence::scroll(uniqueCoordinates, minCoordinate);
 	uniqueCoordinates->add(uniqueCoordinates->getAt(0));
-	if (algorithm::CGAlgorithms::isCCW(uniqueCoordinates)==clockwise) {
+	if (algorithm::Orientation::isCCW(uniqueCoordinates)==clockwise) {
 		CoordinateSequence::reverse(uniqueCoordinates);
 	}
 	ring->setPoints(uniqueCoordinates);
diff --git a/src/geomgraph/EdgeEnd.cpp b/src/geomgraph/EdgeEnd.cpp
index 9650b8a..d5ebcdd 100644
--- a/src/geomgraph/EdgeEnd.cpp
+++ b/src/geomgraph/EdgeEnd.cpp
@@ -20,7 +20,7 @@
 
 #include <geos/geomgraph/EdgeEnd.h>
 #include <geos/geomgraph/Node.h> // for assertions
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/geomgraph/Label.h>
 #include <geos/geomgraph/Quadrant.h>
 #include <geos/geom/Coordinate.h>
@@ -178,7 +178,7 @@ EdgeEnd::compareDirection(const EdgeEnd* e) const
 	// vectors are in the same quadrant - check relative
 	// orientation of direction vectors
 	// this is > e if it is CCW of e
-	return CGAlgorithms::computeOrientation(e->p0, e->p1, p1);
+	return Orientation::index(e->p0, e->p1, p1);
 }
 
 /*public*/
diff --git a/src/geomgraph/EdgeRing.cpp b/src/geomgraph/EdgeRing.cpp
index 17127b1..1c602f8 100644
--- a/src/geomgraph/EdgeRing.cpp
+++ b/src/geomgraph/EdgeRing.cpp
@@ -21,6 +21,7 @@
 #include <geos/util/Assert.h>
 #include <geos/util/TopologyException.h>
 #include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/geomgraph/EdgeRing.h>
 #include <geos/geomgraph/DirectedEdge.h>
 #include <geos/geomgraph/DirectedEdgeStar.h>
@@ -204,7 +205,7 @@ EdgeRing::computeRing()
 
 	if (ring!=nullptr) return;   // don't compute more than once
 	ring=geometryFactory->createLinearRing(pts);
-	isHoleVar=CGAlgorithms::isCCW(pts);
+	isHoleVar=Orientation::isCCW(pts);
 
 	testInvariant();
 
diff --git a/src/geomgraph/GeometryGraph.cpp b/src/geomgraph/GeometryGraph.cpp
index b838919..e0ab745 100644
--- a/src/geomgraph/GeometryGraph.cpp
+++ b/src/geomgraph/GeometryGraph.cpp
@@ -18,7 +18,7 @@
  *
  **********************************************************************/
 
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/BoundaryNodeRule.h>
 
 #include <geos/util/UnsupportedOperationException.h>
@@ -258,7 +258,7 @@ GeometryGraph::addPolygonRing(const LinearRing *lr, int cwLeft, int cwRight)
 	 */
 	try
 	{
-		if (CGAlgorithms::isCCW(coord)) {
+		if (Orientation::isCCW(coord)) {
 			left=cwRight;
 			right=cwLeft;
 		}
diff --git a/src/geomgraph/PlanarGraph.cpp b/src/geomgraph/PlanarGraph.cpp
index 859f1bd..18d9d04 100644
--- a/src/geomgraph/PlanarGraph.cpp
+++ b/src/geomgraph/PlanarGraph.cpp
@@ -31,7 +31,7 @@
 #include <geos/geomgraph/NodeMap.h>
 #include <geos/geomgraph/Quadrant.h>
 
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 
 #include <vector>
 #include <sstream>
@@ -353,7 +353,7 @@ PlanarGraph::matchInSameDirection(const Coordinate& p0, const Coordinate& p1,
 	if (!(p0==ep0))
 		return false;
 
-	if (CGAlgorithms::computeOrientation(p0,p1,ep1)==CGAlgorithms::COLLINEAR
+	if (Orientation::index(p0,p1,ep1)==Orientation::COLLINEAR
 		&& Quadrant::quadrant(p0,p1)==Quadrant::quadrant(ep0,ep1))
 			return true;
 	return false;
diff --git a/src/operation/buffer/BufferInputLineSimplifier.cpp b/src/operation/buffer/BufferInputLineSimplifier.cpp
index 4dda5b9..4772794 100644
--- a/src/operation/buffer/BufferInputLineSimplifier.cpp
+++ b/src/operation/buffer/BufferInputLineSimplifier.cpp
@@ -20,6 +20,7 @@
 #include <geos/geom/CoordinateSequence.h> // for inlines
 #include <geos/geom/CoordinateArraySequence.h> // for constructing the return
 #include <geos/algorithm/CGAlgorithms.h> // for use
+#include <geos/algorithm/Orientation.h> // for use
 
 #include <memory>
 #include <cmath>
@@ -27,7 +28,7 @@
 
 //#include <cassert>
 
-using namespace geos::algorithm; // CGAlgorithms
+using namespace geos::algorithm; // Orientation
 using namespace geos::geom;
 //using namespace geos::geomgraph; // DirectedEdge, Position
 
@@ -39,7 +40,7 @@ BufferInputLineSimplifier::BufferInputLineSimplifier(
 		const geom::CoordinateSequence& input)
 	:
 	inputLine(input),
-	angleOrientation(CGAlgorithms::COUNTERCLOCKWISE)
+	angleOrientation(Orientation::COUNTERCLOCKWISE)
 {}
 
 /*public static*/
@@ -57,7 +58,7 @@ BufferInputLineSimplifier::simplify(double nDistanceTol)
 {
 	distanceTol = fabs(nDistanceTol);
 	if (nDistanceTol < 0)
-		angleOrientation = CGAlgorithms::CLOCKWISE;
+		angleOrientation = Orientation::CLOCKWISE;
 
 	// rely on fact that boolean array is filled with false value
 	static const int startValue = INIT;
@@ -160,7 +161,7 @@ BufferInputLineSimplifier::isShallowConcavity(const geom::Coordinate& p0,
                                               const geom::Coordinate& p2,
                                               double p_distanceTol) const
 {
-	int orientation = CGAlgorithms::computeOrientation(p0, p1, p2);
+	int orientation = Orientation::index(p0, p1, p2);
 	bool isAngleToSimplify = (orientation == angleOrientation);
 	if (! isAngleToSimplify)
 		return false;
@@ -204,7 +205,7 @@ BufferInputLineSimplifier::isConcave(const geom::Coordinate& p0,
                                      const geom::Coordinate& p1,
                                      const geom::Coordinate& p2) const
 {
-	int orientation = CGAlgorithms::computeOrientation(p0, p1, p2);
+	int orientation = Orientation::index(p0, p1, p2);
 	bool p_isConcave = (orientation == angleOrientation);
 	return p_isConcave;
 }
diff --git a/src/operation/buffer/OffsetCurveSetBuilder.cpp b/src/operation/buffer/OffsetCurveSetBuilder.cpp
index f384d42..1e365f5 100644
--- a/src/operation/buffer/OffsetCurveSetBuilder.cpp
+++ b/src/operation/buffer/OffsetCurveSetBuilder.cpp
@@ -20,6 +20,7 @@
 
 #include <geos/platform.h>
 #include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/MinimumDiameter.h>
 #include <geos/util/UnsupportedOperationException.h>
 #include <geos/operation/buffer/OffsetCurveSetBuilder.h>
@@ -53,7 +54,7 @@
 using namespace geos::geom;
 using namespace geos::noding; // SegmentString
 using namespace geos::geomgraph; // Label, Position
-using namespace geos::algorithm; // CGAlgorithms
+using namespace geos::algorithm; // Orientation
 
 namespace geos {
 namespace operation { // geos.operation
@@ -301,10 +302,10 @@ OffsetCurveSetBuilder::addPolygonRing(const CoordinateSequence *coord,
 	int leftLoc=cwLeftLoc;
 	int rightLoc=cwRightLoc;
 #if GEOS_DEBUG
-	std::cerr<<"OffsetCurveSetBuilder::addPolygonRing: CCW: "<<CGAlgorithms::isCCW(coord)<<std::endl;
+	std::cerr<<"OffsetCurveSetBuilder::addPolygonRing: CCW: "<<Orientation::isCCW(coord)<<std::endl;
 #endif
 	if (coord->size() >= LinearRing::MINIMUM_VALID_SIZE
-			&& CGAlgorithms::isCCW(coord))
+			&& Orientation::isCCW(coord))
 	{
 		leftLoc=cwRightLoc;
 		rightLoc=cwLeftLoc;
diff --git a/src/operation/buffer/OffsetSegmentGenerator.cpp b/src/operation/buffer/OffsetSegmentGenerator.cpp
index 12afdac..cad67d7 100644
--- a/src/operation/buffer/OffsetSegmentGenerator.cpp
+++ b/src/operation/buffer/OffsetSegmentGenerator.cpp
@@ -20,7 +20,7 @@
 #include <cmath>
 #include <vector>
 
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/Angle.h>
 #include <geos/operation/buffer/OffsetSegmentGenerator.h>
 #include <geos/operation/buffer/OffsetSegmentString.h>
@@ -147,12 +147,12 @@ OffsetSegmentGenerator::addNextSegment(const Coordinate &p, bool addStartPoint)
   seg1.setCoordinates(s1, s2);
   computeOffsetSegment(seg1, side, distance, offset1);
 
-  int orientation=CGAlgorithms::computeOrientation(s0, s1, s2);
+  int orientation=Orientation::index(s0, s1, s2);
   bool outsideTurn =
-    (orientation==CGAlgorithms::CLOCKWISE
+    (orientation==Orientation::CLOCKWISE
      && side==Position::LEFT)
     ||
-    (orientation==CGAlgorithms::COUNTERCLOCKWISE
+    (orientation==Orientation::COUNTERCLOCKWISE
      && side==Position::RIGHT);
 
   if (orientation==0)
@@ -210,7 +210,7 @@ OffsetSegmentGenerator::addLineEndCap(const Coordinate &p0, const Coordinate &p1
       // add offset seg points with a fillet between them
       segList.addPt(offsetL.p1);
       addFillet(p1, angle+PI/2.0, angle-PI/2.0,
-                CGAlgorithms::CLOCKWISE, distance);
+                Orientation::CLOCKWISE, distance);
       segList.addPt(offsetR.p1);
       break;
     case BufferParameters::CAP_FLAT:
@@ -249,7 +249,7 @@ OffsetSegmentGenerator::addFillet(const Coordinate &p, const Coordinate &p0,
   double dy1 = p1.y - p.y;
   double endAngle = atan2(dy1, dx1);
 
-  if (direction == CGAlgorithms::CLOCKWISE) {
+  if (direction == Orientation::CLOCKWISE) {
     if (startAngle <= endAngle) startAngle += 2.0 * PI;
   }
   else {    // direction==COUNTERCLOCKWISE
@@ -266,7 +266,7 @@ void
 OffsetSegmentGenerator::addFillet(const Coordinate &p, double startAngle,
   double endAngle, int direction, double radius)
 {
-  int directionFactor = direction == CGAlgorithms::CLOCKWISE ? -1 : 1;
+  int directionFactor = direction == Orientation::CLOCKWISE ? -1 : 1;
 
   double totalAngle = fabs(startAngle - endAngle);
   int nSegs = (int) (totalAngle / filletAngleQuantum + 0.5);
@@ -352,7 +352,7 @@ OffsetSegmentGenerator::addCollinear(bool addStartPoint)
     else
     {
       addFillet(s1, offset0.p1, offset1.p0,
-          CGAlgorithms::CLOCKWISE, distance);
+          Orientation::CLOCKWISE, distance);
     }
   }
 }
diff --git a/src/operation/buffer/RightmostEdgeFinder.cpp b/src/operation/buffer/RightmostEdgeFinder.cpp
index 89a83a7..b58fdfb 100644
--- a/src/operation/buffer/RightmostEdgeFinder.cpp
+++ b/src/operation/buffer/RightmostEdgeFinder.cpp
@@ -17,7 +17,7 @@
  *
  **********************************************************************/
 
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/operation/buffer/RightmostEdgeFinder.h>
 #include <geos/geomgraph/DirectedEdge.h>
 #include <geos/geomgraph/DirectedEdgeStar.h>
@@ -29,7 +29,7 @@
 #include <vector>
 #include <cassert>
 
-using namespace geos::algorithm; // CGAlgorithms
+using namespace geos::algorithm; // Orientation
 using namespace geos::geom;
 using namespace geos::geomgraph; // DirectedEdge, Position
 
@@ -166,7 +166,7 @@ RightmostEdgeFinder::findRightmostEdgeAtVertex()
 
 	const Coordinate& pPrev=pts->getAt(minIndex-1);
 	const Coordinate& pNext=pts->getAt(minIndex+1);
-	int orientation=CGAlgorithms::computeOrientation(
+	int orientation=Orientation::index(
 			minCoord,
 			pNext,
 			pPrev);
@@ -174,12 +174,12 @@ RightmostEdgeFinder::findRightmostEdgeAtVertex()
 
 	// both segments are below min point
 	if ( pPrev.y < minCoord.y && pNext.y < minCoord.y
-		&& orientation == CGAlgorithms::COUNTERCLOCKWISE)
+		&& orientation == Orientation::COUNTERCLOCKWISE)
 	{
 			usePrev=true;
 	}
 	else if ( pPrev.y > minCoord.y && pNext.y > minCoord.y
-		&& orientation == CGAlgorithms::CLOCKWISE)
+		&& orientation == Orientation::CLOCKWISE)
 	{
 			usePrev=true;
 	}
diff --git a/src/operation/buffer/SubgraphDepthLocater.cpp b/src/operation/buffer/SubgraphDepthLocater.cpp
index 51c23e7..50bdd72 100644
--- a/src/operation/buffer/SubgraphDepthLocater.cpp
+++ b/src/operation/buffer/SubgraphDepthLocater.cpp
@@ -24,7 +24,7 @@
 #include <geos/operation/buffer/BufferSubgraph.h>
 #include <geos/operation/buffer/SubgraphDepthLocater.h>
 
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 
 #include <geos/geom/Envelope.h>
 #include <geos/geom/CoordinateSequence.h>
@@ -315,11 +315,11 @@ SubgraphDepthLocater::findStabbedSegments(
 
 		// skip if stabbing ray is right of the segment
 #ifndef SKIP_LS
-		if (CGAlgorithms::computeOrientation(seg.p0, seg.p1,
+		if (Orientation::index(seg.p0, seg.p1,
 #else
-		if (CGAlgorithms::computeOrientation(*low, *high,
+		if (Orientation::index(*low, *high,
 #endif
-				stabbingRayLeftPt)==CGAlgorithms::RIGHT)
+				stabbingRayLeftPt)==Orientation::RIGHT)
 		{
 #if GEOS_DEBUG
 			cerr<<" stabbing ray right of segment, skipping"<<endl;
diff --git a/src/operation/intersection/RectangleIntersection.cpp b/src/operation/intersection/RectangleIntersection.cpp
index df4e8f4..3178c46 100644
--- a/src/operation/intersection/RectangleIntersection.cpp
+++ b/src/operation/intersection/RectangleIntersection.cpp
@@ -13,6 +13,7 @@
  **********************************************************************/
 
 #include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/operation/intersection/RectangleIntersection.h>
 #include <geos/operation/intersection/Rectangle.h>
 #include <geos/operation/intersection/RectangleIntersectionBuilder.h>
@@ -470,6 +471,7 @@ RectangleIntersection::clip_polygon_to_polygons(const geom::Polygon * g,
   // completely outside.
 
   using geos::algorithm::CGAlgorithms;
+  using geos::algorithm::Orientation;
   if( parts.empty() )
   {
     Coordinate rectCenter(rect.xmin(), rect.ymin());
@@ -485,7 +487,7 @@ RectangleIntersection::clip_polygon_to_polygons(const geom::Polygon * g,
   else
   {
     // TODO: make CCW checking part of clip_linestring_parts ?
-    if ( CGAlgorithms::isCCW(shell->getCoordinatesRO()) ) {
+    if ( Orientation::isCCW(shell->getCoordinatesRO()) ) {
       parts.reverseLines();
     }
   }
@@ -515,7 +517,7 @@ RectangleIntersection::clip_polygon_to_polygons(const geom::Polygon * g,
 		  if(!holeparts.empty())
 			{
         // TODO: make CCW checking part of clip_linestring_parts ?
-        if ( ! CGAlgorithms::isCCW(hole->getCoordinatesRO()) ) {
+        if ( ! Orientation::isCCW(hole->getCoordinatesRO()) ) {
           holeparts.reverseLines();
         }
 			  holeparts.reconnect();
diff --git a/src/operation/polygonize/EdgeRing.cpp b/src/operation/polygonize/EdgeRing.cpp
index 93ebd38..52503f1 100644
--- a/src/operation/polygonize/EdgeRing.cpp
+++ b/src/operation/polygonize/EdgeRing.cpp
@@ -27,6 +27,7 @@
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/CoordinateSequenceFactory.h>
 #include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/util/IllegalArgumentException.h>
 #include <geos/util.h> // TODO: drop this, includes too much
 
@@ -161,7 +162,7 @@ EdgeRing::add(const DirectedEdge *de){
 bool
 EdgeRing::isHole(){
     getRingInternal();
-    return CGAlgorithms::isCCW(ring->getCoordinatesRO());
+    return Orientation::isCCW(ring->getCoordinatesRO());
 }
 
 /*public*/
diff --git a/src/planargraph/DirectedEdge.cpp b/src/planargraph/DirectedEdge.cpp
index 37942f8..5987359 100644
--- a/src/planargraph/DirectedEdge.cpp
+++ b/src/planargraph/DirectedEdge.cpp
@@ -15,7 +15,7 @@
 #include <geos/planargraph/DirectedEdge.h>
 #include <geos/planargraph/Node.h>
 #include <geos/geomgraph/Quadrant.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 
 #include <cmath>
 #include <sstream>
@@ -159,7 +159,7 @@ DirectedEdge::compareDirection(const DirectedEdge *e) const
 	if (quadrant < e->quadrant) return -1;
 	// vectors are in the same quadrant - check relative orientation of direction vectors
 	// this is > e if it is CCW of e
-	return algorithm::CGAlgorithms::computeOrientation(e->p0,e->p1,p1);
+	return algorithm::Orientation::index(e->p0,e->p1,p1);
 }
 
 /*public*/
diff --git a/tests/unit/algorithm/CGAlgorithms/computeOrientationTest.cpp b/tests/unit/algorithm/CGAlgorithms/computeOrientationTest.cpp
index 2161f8f..d403913 100644
--- a/tests/unit/algorithm/CGAlgorithms/computeOrientationTest.cpp
+++ b/tests/unit/algorithm/CGAlgorithms/computeOrientationTest.cpp
@@ -4,8 +4,8 @@
 
 #include <tut/tut.hpp>
 // geos
-#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/algorithm/CGAlgorithmsDD.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/CoordinateArraySequence.h>
@@ -35,7 +35,7 @@ namespace tut
     typedef test_group<test_computeorientation_data> group;
     typedef group::object object;
 
-    group test_computeorientation_group("geos::algorithm::CGAlgorithms::computeOrientation");
+    group test_computeorientation_group("geos::algorithm::Orientation::index");
 
     //
     // Test Cases
@@ -51,9 +51,9 @@ namespace tut
 
         CoordinateSequence::Ptr pts(geom->getCoordinates());
 
-        int const a = CGAlgorithms::computeOrientation(pts->getAt(0), pts->getAt(1), pts->getAt(2));
-        int const b = CGAlgorithms::computeOrientation(pts->getAt(0), pts->getAt(1), pts->getAt(2));
-        int const c = CGAlgorithms::computeOrientation(pts->getAt(0), pts->getAt(1), pts->getAt(2));
+        int const a = Orientation::index(pts->getAt(0), pts->getAt(1), pts->getAt(2));
+        int const b = Orientation::index(pts->getAt(0), pts->getAt(1), pts->getAt(2));
+        int const c = Orientation::index(pts->getAt(0), pts->getAt(1), pts->getAt(2));
 
         ensure_equals( a, b );
         ensure_equals( a, c );
@@ -73,9 +73,9 @@ namespace tut
         pts.add(c2);
         pts.add(c3);
 
-        int const a = CGAlgorithms::computeOrientation(pts[0], pts[1], pts[2]);
-        int const b = CGAlgorithms::computeOrientation(pts[0], pts[1], pts[2]);
-        int const c = CGAlgorithms::computeOrientation(pts[0], pts[1], pts[2]);
+        int const a = Orientation::index(pts[0], pts[1], pts[2]);
+        int const b = Orientation::index(pts[0], pts[1], pts[2]);
+        int const c = Orientation::index(pts[0], pts[1], pts[2]);
 
         ensure_equals( a, b );
         ensure_equals( a, c );
@@ -93,8 +93,8 @@ namespace tut
         Coordinate p(186.80814046338352, 46.28973405831556);
         // CGAlgorithms::orientationIndex gives both the same!!!
         // First case of doubledouble robustness improvement
-        int orient = CGAlgorithmsDD::orientationIndex(p0, p1, p);
-        int orientInv = CGAlgorithmsDD::orientationIndex(p1, p0, p);
+        int orient = Orientation::index(p0, p1, p);
+        int orientInv = Orientation::index(p1, p0, p);
         ensure( orient != orientInv );
     }
 
diff --git a/tests/unit/algorithm/CGAlgorithms/isCCWTest.cpp b/tests/unit/algorithm/CGAlgorithms/isCCWTest.cpp
index 8b512d4..df842fc 100644
--- a/tests/unit/algorithm/CGAlgorithms/isCCWTest.cpp
+++ b/tests/unit/algorithm/CGAlgorithms/isCCWTest.cpp
@@ -1,11 +1,11 @@
 //
-// Test Suite for CGAlgorithms::isCCW() function
+// Test Suite for Orientation::isCCW() function
 // Ported from JTS junit/algorithm/IsCCWTest.java
 
 // tut
 #include <tut/tut.hpp>
 // geos
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/geom/Polygon.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/CoordinateSequence.h>
@@ -50,7 +50,7 @@ namespace tut
     typedef test_group<test_isccw_data> group;
     typedef group::object object;
 
-    group test_isccw_group("geos::algorithm::CGAlgorithms::isCCW");
+    group test_isccw_group("geos::algorithm::Orientation::isCCW");
 
     //
     // Test Cases
@@ -65,7 +65,7 @@ namespace tut
 		GeometryPtr geom(reader_.read(wkt));
 
         cs_ = geom->getCoordinates();
-        bool isCCW = CGAlgorithms::isCCW(cs_);
+        bool isCCW = Orientation::isCCW(cs_);
 
         ensure_equals( false, isCCW );
     }
@@ -79,7 +79,7 @@ namespace tut
 		GeometryPtr geom(reader_.read(wkt));
 
         cs_ = geom->getCoordinates();
-        bool isCCW = CGAlgorithms::isCCW(cs_);
+        bool isCCW = Orientation::isCCW(cs_);
 
         ensure_equals( true, isCCW );
     }
@@ -93,7 +93,7 @@ namespace tut
 		GeometryPtr geom(reader_.read(wkt));
 
         cs_ = geom->getCoordinates();
-        bool isCCW = CGAlgorithms::isCCW(cs_);
+        bool isCCW = Orientation::isCCW(cs_);
 
         ensure_equals( true, isCCW );
     }
@@ -108,8 +108,8 @@ namespace tut
         std::istringstream wkt("0102000000040000000000000000000000841D588465963540F56BFB214F0341408F26B714B2971B40F66BFB214F0341408C26B714B2971B400000000000000000841D588465963540");
         GeometryPtr geom(breader_.readHEX(wkt));
         cs_ = geom->getCoordinates();
-        bool isCCW = CGAlgorithms::isCCW(cs_);
-        ensure_equals( isCCW, false );
+        bool isCCW = Orientation::isCCW(cs_);
+        ensure_equals( isCCW, true );
     }
 
     // 5 - Test orientation the narrow (almost collapsed) ring
@@ -122,7 +122,7 @@ namespace tut
         std::istringstream wkt("0102000000040000000000000000000000841D588465963540F56BFB214F0341408F26B714B2971B40F66BFB214F0341408E26B714B2971B400000000000000000841D588465963540");
         GeometryPtr geom(breader_.readHEX(wkt));
         cs_ = geom->getCoordinates();
-        bool isCCW = CGAlgorithms::isCCW(cs_);
+        bool isCCW = Orientation::isCCW(cs_);
         ensure_equals( isCCW, true );
     }
 
diff --git a/tests/unit/algorithm/RobustLineIntersectorTest.cpp b/tests/unit/algorithm/RobustLineIntersectorTest.cpp
index 40fe1a7..f57ab91 100644
--- a/tests/unit/algorithm/RobustLineIntersectorTest.cpp
+++ b/tests/unit/algorithm/RobustLineIntersectorTest.cpp
@@ -7,6 +7,7 @@
 #include <geos/io/WKTReader.h>
 #include <geos/algorithm/LineIntersector.h>
 #include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/geom/PrecisionModel.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Geometry.h> // required for use in unique_ptr
@@ -24,6 +25,7 @@
 using namespace geos::geom; //
 using geos::algorithm::LineIntersector;
 using geos::algorithm::CGAlgorithms;
+using geos::algorithm::Orientation;
 
 
 namespace tut
@@ -203,7 +205,7 @@ namespace tut
 	template<>
 	void object::test<11>()
 	{
-	    ensure_equals(CGAlgorithms::computeOrientation(
+	    ensure_equals(Orientation::index(
 		Coordinate(-123456789, -40),
 		Coordinate(0, 0),
 		Coordinate(381039468754763.0, 123456789)), 1);
@@ -214,7 +216,7 @@ namespace tut
 	template<>
 	void object::test<12>()
 	{
-	    ensure_equals(CGAlgorithms::computeOrientation(
+	    ensure_equals(Orientation::index(
 		Coordinate(10, 10),
 		Coordinate(20, 20),
 		Coordinate(0, 0)), 0);
@@ -243,7 +245,7 @@ namespace tut
     ensure(!l->intersects(p.get()));
 
     ensure(!CGAlgorithms::isOnLine(q, cs));
-    ensure_equals(CGAlgorithms::computeOrientation(p1, p2, q), -1);
+    ensure_equals(Orientation::index(p1, p2, q), -1);
 
 	}
 
diff --git a/tests/unit/operation/buffer/BufferBuilderTest.cpp b/tests/unit/operation/buffer/BufferBuilderTest.cpp
index bec7228..f18b59a 100644
--- a/tests/unit/operation/buffer/BufferBuilderTest.cpp
+++ b/tests/unit/operation/buffer/BufferBuilderTest.cpp
@@ -12,7 +12,7 @@
 #include <geos/geom/Geometry.h>
 #include <geos/geom/LineString.h>
 #include <geos/algorithm/PointLocator.h>
-#include <geos/algorithm/CGAlgorithms.h>
+#include <geos/algorithm/Orientation.h>
 #include <geos/io/WKTReader.h>
 #include <geos/geom/CoordinateSequence.h>
 // std
@@ -66,7 +66,7 @@ namespace tut
     {
         using geos::operation::buffer::BufferBuilder;
         using geos::operation::buffer::BufferParameters;
-        using geos::algorithm::CGAlgorithms;
+        using geos::algorithm::Orientation;
         using geos::geom::LineString;
 
         // Original input from test in ticket #633
@@ -106,8 +106,8 @@ namespace tut
             // For left-side offset curve, the offset will be at the left side of the input line
             // and retain the same direction.
             ensure_equals(
-                CGAlgorithms::isCCW(dynamic_cast<LineString*>(g0.get())->getCoordinatesRO()),
-                CGAlgorithms::isCCW(dynamic_cast<LineString*>(gB.get())->getCoordinatesRO()));
+                Orientation::isCCW(dynamic_cast<LineString*>(g0.get())->getCoordinatesRO()),
+                Orientation::isCCW(dynamic_cast<LineString*>(gB.get())->getCoordinatesRO()));
         }
 
         // right-side
@@ -121,8 +121,8 @@ namespace tut
             // For right-side offset curve, it'll be at the right side
             // and in the opposite direction.
             ensure_equals(
-                CGAlgorithms::isCCW(dynamic_cast<LineString*>(g0.get())->getCoordinatesRO()),
-                !CGAlgorithms::isCCW(dynamic_cast<LineString*>(gB.get())->getCoordinatesRO()));
+                Orientation::isCCW(dynamic_cast<LineString*>(g0.get())->getCoordinatesRO()),
+                !Orientation::isCCW(dynamic_cast<LineString*>(gB.get())->getCoordinatesRO()));
         }
     }
 
diff --git a/tests/xmltester/tinyxml2/tinyxml2.cpp b/tests/xmltester/tinyxml2/tinyxml2.cpp
index 6fa8596..182f406 100755
--- a/tests/xmltester/tinyxml2/tinyxml2.cpp
+++ b/tests/xmltester/tinyxml2/tinyxml2.cpp
@@ -572,7 +572,7 @@ void XMLUtil::ToStr( bool v, char* buffer, int bufferSize )
 */
 void XMLUtil::ToStr( float v, char* buffer, int bufferSize )
 {
-    TIXML_SNPRINTF( buffer, bufferSize, "%.8f", v );
+    TIXML_SNPRINTF( buffer, bufferSize, "%.8g", (double)v );
 }
 
 

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

Summary of changes:
 capi/geos_ts_c.cpp                                 |   9 +-
 include/geos/algorithm/Makefile.am                 |   1 +
 include/geos/algorithm/Orientation.h               |  91 ++++++++++++++
 include/geos/geom/LineSegment.h                    |   4 +-
 include/geos/geom/util/GeometryTransformer.h       |   2 +-
 include/geos/planargraph/DirectedEdge.h            |   4 +-
 src/algorithm/Centroid.cpp                         |   6 +-
 src/algorithm/ConvexHull.cpp                       |  11 +-
 src/algorithm/Makefile.am                          |   1 +
 src/algorithm/Orientation.cpp                      | 131 +++++++++++++++++++++
 src/geom/Polygon.cpp                               |   4 +-
 src/geomgraph/EdgeEnd.cpp                          |   4 +-
 src/geomgraph/EdgeRing.cpp                         |   3 +-
 src/geomgraph/GeometryGraph.cpp                    |   4 +-
 src/geomgraph/PlanarGraph.cpp                      |   4 +-
 src/operation/buffer/BufferInputLineSimplifier.cpp |  11 +-
 src/operation/buffer/OffsetCurveSetBuilder.cpp     |   7 +-
 src/operation/buffer/OffsetSegmentGenerator.cpp    |  16 +--
 src/operation/buffer/RightmostEdgeFinder.cpp       |  10 +-
 src/operation/buffer/SubgraphDepthLocater.cpp      |   8 +-
 .../intersection/RectangleIntersection.cpp         |   6 +-
 src/operation/polygonize/EdgeRing.cpp              |   3 +-
 src/planargraph/DirectedEdge.cpp                   |   4 +-
 .../CGAlgorithms/computeOrientationTest.cpp        |  20 ++--
 tests/unit/algorithm/CGAlgorithms/isCCWTest.cpp    |  18 +--
 tests/unit/algorithm/RobustLineIntersectorTest.cpp |   8 +-
 tests/unit/operation/buffer/BufferBuilderTest.cpp  |  12 +-
 tests/xmltester/tinyxml2/tinyxml2.cpp              |   2 +-
 28 files changed, 319 insertions(+), 85 deletions(-)
 create mode 100644 include/geos/algorithm/Orientation.h
 create mode 100644 src/algorithm/Orientation.cpp


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list