[geos-commits] r2349 - in trunk/source: headers/geos/operation/buffer operation/buffer

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Apr 14 05:14:35 EDT 2009


Author: strk
Date: 2009-04-14 05:14:35 -0400 (Tue, 14 Apr 2009)
New Revision: 2349

Modified:
   trunk/source/headers/geos/operation/buffer/BufferSubgraph.h
   trunk/source/operation/buffer/BufferSubgraph.cpp
Log:
Sync BufferSubgraph to JTS-1.9

Modified: trunk/source/headers/geos/operation/buffer/BufferSubgraph.h
===================================================================
--- trunk/source/headers/geos/operation/buffer/BufferSubgraph.h	2009-04-14 08:52:30 UTC (rev 2348)
+++ trunk/source/headers/geos/operation/buffer/BufferSubgraph.h	2009-04-14 09:14:35 UTC (rev 2349)
@@ -11,6 +11,10 @@
  * by the Free Software Foundation. 
  * See the COPYING file for more information.
  *
+ **********************************************************************
+ *
+ * Last port: operation/buffer/BufferSubgraph.java rev. 1.21 (JTS-1.9)
+ *
  **********************************************************************/
 
 #ifndef GEOS_OP_BUFFER_BUFFERSUBGRAPH_H
@@ -41,7 +45,8 @@
 namespace buffer { // geos.operation.buffer
 
 /**
- * \brief A connected subset of the graph of DirectedEdges and geomgraph::Node.
+ * \brief
+ * A connected subset of the graph of DirectedEdge and geomgraph::Node.
  * 
  * Its edges will generate either
  * - a single polygon in the complete buffer, with zero or more holes, or
@@ -96,11 +101,7 @@
 
 	friend std::ostream& operator<< (std::ostream& os, const BufferSubgraph& bs);
 
-	/** \brief
-	 * algorithm::CGAlgorithms arg kept for backward-compatibility.
-	 * It is unused.
-	 */
-	BufferSubgraph(algorithm::CGAlgorithms *cga=NULL);
+	BufferSubgraph(); 
 
 	~BufferSubgraph();
 

Modified: trunk/source/operation/buffer/BufferSubgraph.cpp
===================================================================
--- trunk/source/operation/buffer/BufferSubgraph.cpp	2009-04-14 08:52:30 UTC (rev 2348)
+++ trunk/source/operation/buffer/BufferSubgraph.cpp	2009-04-14 09:14:35 UTC (rev 2349)
@@ -4,8 +4,8 @@
  * GEOS - Geometry Engine Open Source
  * http://geos.refractions.net
  *
+ * Copyright (C) 2005 Refractions Research Inc.
  * Copyright (C) 2001-2002 Vivid Solutions Inc.
- * Copyright (C) 2005 Refractions Research Inc.
  *
  * This is free software; you can redistribute and/or modify it under
  * the terms of the GNU Lesser General Public Licence as published
@@ -14,7 +14,7 @@
  *
  **********************************************************************
  *
- * Last port: operation/buffer/BufferSubgraph.java rev. 1.17
+ * Last port: operation/buffer/BufferSubgraph.java rev. 1.21 (JTS-1.9)
  *
  **********************************************************************/
 
@@ -49,7 +49,11 @@
 namespace buffer { // geos.operation.buffer
 
 // Argument is unused
-BufferSubgraph::BufferSubgraph(CGAlgorithms* /*cga*/):
+BufferSubgraph::BufferSubgraph()
+	:
+	finder(),
+	dirEdgeList(),
+	nodes(),
 	rightMostCoord(NULL),
 	env(NULL)
 {
@@ -171,11 +175,12 @@
 	}
 	// MD - testing  Result: breaks algorithm
 	//if (startEdge==null) return;
-	//assert(startEdge!=NULL);
-	if (startEdge==NULL)
+
+	// only compute string append if assertion would fail
+	if (startEdge == NULL)
 	{
 		throw util::TopologyException(
-			"unable to find edge to compute depths",
+			"unable to find edge to compute depths at",
 			n->getCoordinate());
 	}
 



More information about the geos-commits mailing list