[geos-commits] r4117 - in trunk: include/geos/geomgraph src/geomgraph src/operation/relate

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Nov 13 11:10:05 PST 2015


Author: strk
Date: 2015-11-13 11:10:05 -0800 (Fri, 13 Nov 2015)
New Revision: 4117

Modified:
   trunk/include/geos/geomgraph/EdgeEndStar.h
   trunk/src/geomgraph/EdgeEndStar.cpp
   trunk/src/operation/relate/RelateComputer.cpp
Log:
Add output operator for EdgeEndStar

Modified: trunk/include/geos/geomgraph/EdgeEndStar.h
===================================================================
--- trunk/include/geos/geomgraph/EdgeEndStar.h	2015-11-04 20:41:40 UTC (rev 4116)
+++ trunk/include/geos/geomgraph/EdgeEndStar.h	2015-11-13 19:10:05 UTC (rev 4117)
@@ -63,6 +63,8 @@
 class GEOS_DLL EdgeEndStar {
 public:
 
+	friend std::ostream& operator<< (std::ostream&, const EdgeEndStar&);
+
 	typedef std::set<EdgeEnd *, EdgeEndLT> container;
 
 	typedef container::iterator iterator;
@@ -187,6 +189,7 @@
 	return edgeMap.find(eSearch);
 }
 
+std::ostream& operator<< (std::ostream&, const EdgeEnd&);
 
 } // namespace geos.geomgraph
 } // namespace geos

Modified: trunk/src/geomgraph/EdgeEndStar.cpp
===================================================================
--- trunk/src/geomgraph/EdgeEndStar.cpp	2015-11-04 20:41:40 UTC (rev 4116)
+++ trunk/src/geomgraph/EdgeEndStar.cpp	2015-11-13 19:10:05 UTC (rev 4117)
@@ -350,6 +350,13 @@
 	return out;
 }
 
+std::ostream&
+operator<< (std::ostream& os, const EdgeEndStar& ee)
+{
+	os << print();
+	return os;
+}
+
 } // namespace geos.geomgraph
 } // namespace geos
 

Modified: trunk/src/operation/relate/RelateComputer.cpp
===================================================================
--- trunk/src/operation/relate/RelateComputer.cpp	2015-11-04 20:41:40 UTC (rev 4116)
+++ trunk/src/operation/relate/RelateComputer.cpp	2015-11-13 19:10:05 UTC (rev 4117)
@@ -196,9 +196,23 @@
 	std::auto_ptr< std::vector<EdgeEnd*> > ee1 (
 		eeBuilder.computeEdgeEnds((*arg)[1]->getEdges())
   );
+
+#if GEOS_DEBUG
+	std::cerr << "RelateComputer::computeIM: "
+            << "inserting edge ends"
+            << std::endl;
+#endif
+
 	insertEdgeEnds(ee1.get());
 	//Debug.println("==== NodeList ===");
 	//Debug.print(nodes);
+
+#if GEOS_DEBUG
+	std::cerr << "RelateComputer::computeIM: "
+            << "labeling node edges"
+            << std::endl;
+#endif
+
 	labelNodeEdges();
 
 	/**
@@ -401,6 +415,11 @@
 	{
 		assert(dynamic_cast<RelateNode*>(nodeIt->second));
 		RelateNode *node=static_cast<RelateNode*>(nodeIt->second);
+#if GEOS_DEBUG
+    std::cerr << "RelateComputer::labelNodeEdges: "
+              << "node edges: " << *(node->getEdges())
+              << std::endl;
+#endif
 		node->getEdges()->computeLabelling(arg);
 		//Debug.print(node.getEdges());
 		//node.print(System.out);



More information about the geos-commits mailing list