[geos-commits] [SCM] GEOS branch master updated. 80503104e2a2ae1df1bd87ba12b2848c0460f2c6
git at osgeo.org
git at osgeo.org
Mon Feb 1 09:49:20 PST 2021
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 80503104e2a2ae1df1bd87ba12b2848c0460f2c6 (commit)
from a22fc9916a6d5edea91c09545845772a0337de93 (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 80503104e2a2ae1df1bd87ba12b2848c0460f2c6
Author: Daniel Baston <dbaston at gmail.com>
Date: Mon Feb 1 12:45:26 2021 -0500
Add some information to side location error message.
diff --git a/src/geomgraph/EdgeEndStar.cpp b/src/geomgraph/EdgeEndStar.cpp
index daeb6b3..a07330b 100644
--- a/src/geomgraph/EdgeEndStar.cpp
+++ b/src/geomgraph/EdgeEndStar.cpp
@@ -307,9 +307,13 @@ EdgeEndStar::propagateSideLabels(uint32_t geomIndex)
// if there is a right location, that is the next
// location to propagate
if(rightLoc != Location::NONE) {
- if(rightLoc != currLoc)
- throw util::TopologyException("side location conflict",
- e->getCoordinate());
+ if(rightLoc != currLoc) {
+ std::stringstream ss;
+ ss << "side location conflict at ";
+ ss << e->getCoordinate().toString();
+ ss << ". This can occur if the input geometry is invalid.";
+ throw util::TopologyException(ss.str());
+ }
if(leftLoc == Location::NONE) {
// found single null side at e->getCoordinate()
assert(0);
diff --git a/src/operation/overlayng/OverlayLabeller.cpp b/src/operation/overlayng/OverlayLabeller.cpp
index 28d8fa2..478f26e 100644
--- a/src/operation/overlayng/OverlayLabeller.cpp
+++ b/src/operation/overlayng/OverlayLabeller.cpp
@@ -22,6 +22,8 @@
#include <geos/util/Assert.h>
#include <geos/util/TopologyException.h>
+#include <sstream>
+
namespace geos { // geos
namespace operation { // geos.operation
@@ -107,7 +109,11 @@ OverlayLabeller::propagateAreaLocations(OverlayEdge* nodeEdge, uint8_t geomIndex
*/
Location locRight = e->getLocation(geomIndex, Position::RIGHT);
if (locRight != currLoc) {
- throw util::TopologyException("side location conflict", e->getCoordinate());
+ std::stringstream ss;
+ ss << "side location conflict at ";
+ ss << e->getCoordinate().toString();
+ ss << ". This can occur if the input geometry is invalid.";
+ throw util::TopologyException(ss.str());
}
Location locLeft = e->getLocation(geomIndex, Position::LEFT);
if (locLeft == Location::NONE) {
-----------------------------------------------------------------------
Summary of changes:
src/geomgraph/EdgeEndStar.cpp | 10 +++++++---
src/operation/overlayng/OverlayLabeller.cpp | 8 +++++++-
2 files changed, 14 insertions(+), 4 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list