21 #ifndef GEOS_OP_LINEMERGE_LINESEQUENCER_H
22 #define GEOS_OP_LINEMERGE_LINESEQUENCER_H
24 #include <geos/export.h>
26 #include <geos/operation/linemerge/LineMergeGraph.h>
27 #include <geos/geom/Geometry.h>
28 #include <geos/geom/LineString.h>
36 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
42 class GeometryFactory;
46 namespace planargraph {
103 typedef std::list<planargraph::DirectedEdge*> DirEdgeList;
104 typedef std::vector< DirEdgeList* > Sequences;
108 unsigned int lineCount;
110 std::auto_ptr<geom::Geometry> sequencedGeometry;
111 bool isSequenceableVar;
114 void computeSequence();
115 Sequences* findSequences();
118 void delAll( Sequences& );
135 geom::Geometry* buildSequencedGeometry(
const Sequences& sequences);
142 DirEdgeList::iterator lit,
143 bool expectedClosed);
174 DirEdgeList* orient(DirEdgeList* seq);
184 DirEdgeList* reverse(DirEdgeList& seq);
209 sequencedGeometry(0),
210 isSequenceableVar(
false)
233 return isSequenceableVar;
248 template <
class TargetContainer>
249 void add(TargetContainer& geoms)
251 for (
typename TargetContainer::const_iterator i = geoms.begin(),
252 e = geoms.end(); i != e; ++i)
283 if (release)
return sequencedGeometry.release();
284 else return sequencedGeometry.get();
296 #endif // GEOS_OP_LINEMERGE_LINESEQUENCER_H