[geos-commits] r3331 - trunk/src/geomgraph

svn_geos at osgeo.org svn_geos at osgeo.org
Fri May 6 14:51:38 EDT 2011


Author: strk
Date: 2011-05-06 11:51:37 -0700 (Fri, 06 May 2011)
New Revision: 3331

Modified:
   trunk/src/geomgraph/Edge.cpp
   trunk/src/geomgraph/EdgeIntersection.cpp
   trunk/src/geomgraph/EdgeIntersectionList.cpp
Log:
Make output operators for Edge, EdgeIntersection and EdgeIntersectionList closer to JTS, for easier comparison

Modified: trunk/src/geomgraph/Edge.cpp
===================================================================
--- trunk/src/geomgraph/Edge.cpp	2011-05-06 18:51:30 UTC (rev 3330)
+++ trunk/src/geomgraph/Edge.cpp	2011-05-06 18:51:37 UTC (rev 3331)
@@ -296,15 +296,15 @@
 std::ostream&
 operator<< (std::ostream&os, const Edge& e)
 {
-	os << "EDGE";
-	if ( e.name != "" ) os << " name:" << e.name;
+	os << "edge";
+	if ( e.name != "" ) os << " " << e.name;
 
-	os << " label:" << e.label->toString()
-	   << " depthDelta:" << e.depthDelta
-	   << ":" << std::endl
+	os
 	   << "  LINESTRING"
-	   //<< *(e.pts); 
-	   << e.pts->toString();
+	   << *(e.pts)
+	   << "  " << e.label->toString()
+	   << "  " << e.depthDelta
+	   ;
 
 	return os;
 }

Modified: trunk/src/geomgraph/EdgeIntersection.cpp
===================================================================
--- trunk/src/geomgraph/EdgeIntersection.cpp	2011-05-06 18:51:30 UTC (rev 3330)
+++ trunk/src/geomgraph/EdgeIntersection.cpp	2011-05-06 18:51:37 UTC (rev 3331)
@@ -73,7 +73,7 @@
 std::ostream&
 operator<< (std::ostream&os, const EdgeIntersection& e)
 {
-	os << e.coord << " seg#=" << e.segmentIndex << " dist=" << e.dist;
+	os << e.coord << " seg # = " << e.segmentIndex << " dist = " << e.dist;
 	return os;
 }
 

Modified: trunk/src/geomgraph/EdgeIntersectionList.cpp
===================================================================
--- trunk/src/geomgraph/EdgeIntersectionList.cpp	2011-05-06 18:51:30 UTC (rev 3330)
+++ trunk/src/geomgraph/EdgeIntersectionList.cpp	2011-05-06 18:51:37 UTC (rev 3331)
@@ -188,7 +188,7 @@
 std::ostream&
 operator<< (std::ostream&os, const EdgeIntersectionList& e)
 {
-  os << "Intersections: ";
+  os << "Intersections:" << std::endl;
   EdgeIntersectionList::const_iterator it=e.begin(), endIt=e.end();
   for (; it!=endIt; ++it) {
     EdgeIntersection *ei=*it;



More information about the geos-commits mailing list