[geos-commits] [SCM] GEOS branch master updated. 10ff0f8d6809c212aa9eb75f710bd068a90ccff0
git at osgeo.org
git at osgeo.org
Fri Dec 14 09:24:48 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 10ff0f8d6809c212aa9eb75f710bd068a90ccff0 (commit)
from 6fa30ee64b91f3456c4b6435cb6713ad1c6cdebc (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 10ff0f8d6809c212aa9eb75f710bd068a90ccff0
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Fri Dec 14 09:24:28 2018 -0800
Remove references to RobustDeterminant
JTS 2fc9fa215cdfff4210ec55cb8c6cfb79618b4ff2
diff --git a/src/algorithm/CGAlgorithmsDD.cpp b/src/algorithm/CGAlgorithmsDD.cpp
index 89f9e48..1f026e3 100644
--- a/src/algorithm/CGAlgorithmsDD.cpp
+++ b/src/algorithm/CGAlgorithmsDD.cpp
@@ -19,6 +19,7 @@
#include <geos/algorithm/CGAlgorithmsDD.h>
#include <geos/geom/Coordinate.h>
+#include <geos/util/IllegalArgumentException.h>
#include <sstream>
using namespace geos::geom;
@@ -74,6 +75,10 @@ int CGAlgorithmsDD::signOfDet2x2(DD &x1, DD &y1, DD &x2, DD &y2)
int CGAlgorithmsDD::signOfDet2x2(double dx1, double dy1, double dx2, double dy2)
{
+ if (ISNAN(dx1) || ISNAN(dy1) || ISNAN(dx2) || ISNAN(dy2) ||
+ !FINITE(dx1) || !FINITE(dy1) || !FINITE(dx2) || !FINITE(dy2)) {
+ throw util::IllegalArgumentException("CGAlgorithmsDD::signOfDet2x2 encountered NaN/Inf numbers");
+ }
DD x1(dx1);
DD y1(dy1);
DD x2(dx2);
diff --git a/src/algorithm/RayCrossingCounter.cpp b/src/algorithm/RayCrossingCounter.cpp
index 9c38d07..3406cc5 100644
--- a/src/algorithm/RayCrossingCounter.cpp
+++ b/src/algorithm/RayCrossingCounter.cpp
@@ -16,6 +16,7 @@
*
**********************************************************************/
+#include <geos/algorithm/CGAlgorithmsDD.h>
#include <geos/algorithm/RayCrossingCounter.h>
#include <geos/algorithm/RobustDeterminant.h>
#include <geos/geom/Geometry.h>
@@ -87,7 +88,7 @@ RayCrossingCounter::orientationIndex(const geom::Coordinate& p1,
double dy1=p2.y-p1.y;
double dx2=q.x-p2.x;
double dy2=q.y-p2.y;
- return RobustDeterminant::signOfDet2x2(dx1,dy1,dx2,dy2);
+ return CGAlgorithmsDD::signOfDet2x2(dx1,dy1,dx2,dy2);
}
void
diff --git a/src/algorithm/SIRtreePointInRing.cpp b/src/algorithm/SIRtreePointInRing.cpp
index 19adc14..f4b5baf 100644
--- a/src/algorithm/SIRtreePointInRing.cpp
+++ b/src/algorithm/SIRtreePointInRing.cpp
@@ -15,6 +15,7 @@
*
**********************************************************************/
+#include <geos/algorithm/CGAlgorithmsDD.h>
#include <geos/algorithm/SIRtreePointInRing.h>
#include <geos/algorithm/RobustDeterminant.h>
#include <geos/index/strtree/SIRtree.h>
@@ -97,7 +98,7 @@ SIRtreePointInRing::testLineSegment(const Coordinate& p,LineSegment *seg)
/*
* segment straddles x axis,so compute intersection.
*/
- xInt=RobustDeterminant::signOfDet2x2(x1,y1,x2,y2)/(y2-y1);
+ xInt = CGAlgorithmsDD::signOfDet2x2(x1,y1,x2,y2)/(y2-y1);
/*
* crosses ray if strictly positive intersection.
*/
-----------------------------------------------------------------------
Summary of changes:
src/algorithm/CGAlgorithmsDD.cpp | 5 +++++
src/algorithm/RayCrossingCounter.cpp | 3 ++-
src/algorithm/SIRtreePointInRing.cpp | 3 ++-
3 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list