[geos-commits] r2552 - in trunk/source: headers/geos/operation/overlay operation/overlay

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Jun 5 14:18:35 EDT 2009


Author: strk
Date: 2009-06-05 14:18:35 -0400 (Fri, 05 Jun 2009)
New Revision: 2552

Modified:
   trunk/source/headers/geos/operation/overlay/OverlayOp.h
   trunk/source/operation/overlay/OverlayOp.cpp
Log:
JTS-1.10 OverlayOp

Modified: trunk/source/headers/geos/operation/overlay/OverlayOp.h
===================================================================
--- trunk/source/headers/geos/operation/overlay/OverlayOp.h	2009-06-05 18:12:30 UTC (rev 2551)
+++ trunk/source/headers/geos/operation/overlay/OverlayOp.h	2009-06-05 18:18:35 UTC (rev 2552)
@@ -11,6 +11,12 @@
  * by the Free Software Foundation. 
  * See the COPYING file for more information.
  *
+ ***********************************************************************
+ *
+ * Last port: operation/overlay/OverlayOp.java rev. 1.31 (JTS-1.10)
+ *
+ * EXPOSED GEOS HEADER
+ *
  **********************************************************************/
 
 #ifndef GEOS_OP_OVERLAY_OVERLAYOP_H

Modified: trunk/source/operation/overlay/OverlayOp.cpp
===================================================================
--- trunk/source/operation/overlay/OverlayOp.cpp	2009-06-05 18:12:30 UTC (rev 2551)
+++ trunk/source/operation/overlay/OverlayOp.cpp	2009-06-05 18:18:35 UTC (rev 2552)
@@ -14,8 +14,10 @@
  *
  ***********************************************************************
  *
- * Last port: operation/overlay/OverlayOp.java rev. 1.23
+ * Last port: operation/overlay/OverlayOp.java rev. 1.31 (JTS-1.10)
  *
+ * NOTE: Use of EdgeNodingValidator is not strictly the same
+ *
  **********************************************************************/
 
 #include <geos/operation/overlay/OverlayOp.h>
@@ -680,14 +682,28 @@
 	//Debug.println(edgeList);
 
 #ifdef ENABLE_EDGE_NODING_VALIDATOR // {
-	if ( resultPrecisionModel->isFloating() )
+	/**
+	 * Check that the noding completed correctly.
+	 *
+	 * This test is slow, but necessary in order to catch
+	 * robustness failure situations.
+	 * If an exception is thrown because of a noding failure,
+	 * then snapping will be performed, which will hopefully avoid
+	 * the problem.
+	 * In the future hopefully a faster check can be developed.
+	 *
+	 */
+	if ( resultPrecisionModel->isFloating() ) // NOTE: this is not in JTS
 	{
-		// Will throw TopologyException if noding is found to be invalid
-		EdgeNodingValidator nv(edgeList.getEdges());
 
-		try {
-			nv.checkValid();
-		} catch (const util::TopologyException& ex) {
+		try
+		{
+			// Will throw TopologyException if noding is
+			// found to be invalid
+			EdgeNodingValidator::checkValid(edgeList.getEdges());
+		}
+		catch (const util::TopologyException& ex)
+		{
 #ifdef GEOS_DEBUG_VALIDATION // {
 			cout << "EdgeNodingValidator found noding invalid: " << ex.what() << endl;
 #endif // }



More information about the geos-commits mailing list