[geos-commits] r3229 - trunk/include/geos/operation/linemerge

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Feb 21 12:30:28 EST 2011


Author: strk
Date: 2011-02-21 09:30:28 -0800 (Mon, 21 Feb 2011)
New Revision: 3229

Modified:
   trunk/include/geos/operation/linemerge/LineSequencer.h
Log:
Add templated geometry adder to LineSequencer class

Modified: trunk/include/geos/operation/linemerge/LineSequencer.h
===================================================================
--- trunk/include/geos/operation/linemerge/LineSequencer.h	2011-02-21 16:14:38 UTC (rev 3228)
+++ trunk/include/geos/operation/linemerge/LineSequencer.h	2011-02-21 17:30:28 UTC (rev 3229)
@@ -227,6 +227,17 @@
 		geometry.applyComponentFilter(*this);
 	}
 
+  template <class TargetContainer>
+  void add(TargetContainer& geoms)
+  {
+    for (typename TargetContainer::const_iterator i = geoms.begin(),
+         e = geoms.end(); i != e; ++i)
+    {
+      const geom::Geometry* g = *i;
+      add(*g);
+    }
+  }
+
 	/**
 	 * Act as a GeometryComponentFilter so to extract
 	 * the linearworks



More information about the geos-commits mailing list