20#ifndef GEOS_OP_LINEMERGE_LINESEQUENCER_H
21#define GEOS_OP_LINEMERGE_LINESEQUENCER_H
23#include <geos/export.h>
25#include <geos/operation/linemerge/LineMergeGraph.h>
26#include <geos/geom/Geometry.h>
27#include <geos/geom/LineString.h>
35#pragma warning(disable: 4251)
99class GEOS_DLL LineSequencer {
102 typedef std::list<planargraph::DirectedEdge*> DirEdgeList;
103 typedef std::vector< DirEdgeList* > Sequences;
107 unsigned int lineCount;
109 std::auto_ptr<geom::Geometry> sequencedGeometry;
110 bool isSequenceableVar;
113 void computeSequence();
114 Sequences* findSequences();
117 void delAll( Sequences& );
134 geom::Geometry* buildSequencedGeometry(
const Sequences& sequences);
141 DirEdgeList::iterator lit,
142 bool expectedClosed);
173 DirEdgeList* orient(DirEdgeList* seq);
183 DirEdgeList* reverse(DirEdgeList& seq);
198 LineSequencer sequencer;
208 sequencedGeometry(0),
209 isSequenceableVar(
false)
232 return isSequenceableVar;
247 template <
class TargetContainer>
248 void add(TargetContainer& geoms)
250 for (
typename TargetContainer::const_iterator i = geoms.begin(),
251 e = geoms.end(); i != e; ++i)
282 if (release)
return sequencedGeometry.release();
283 else return sequencedGeometry.get();
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:67
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
void applyComponentFilter(T &f) const
Apply a fiter to each component of this geometry. The filter is expected to provide a ....
Definition Geometry.h:685
Definition LineString.h:70
A planar graph of edges that is analyzed to sew the edges together.
Definition LineMergeGraph.h:59
bool isSequenceable()
Definition LineSequencer.h:230
void add(const geom::Geometry &geometry)
Definition LineSequencer.h:243
geom::Geometry * getSequencedLineStrings(bool release=1)
Definition LineSequencer.h:280
void filter(const geom::Geometry *g)
Definition LineSequencer.h:262
static bool isSequenced(const geom::Geometry *geom)
Represents a directed edge in a PlanarGraph.
Definition planargraph/DirectedEdge.h:46
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition planargraph/Node.h:45
A subgraph of a PlanarGraph.
Definition Subgraph.h:54
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Line merging package.
Definition EdgeString.h:40
Provides classes for implementing operations on geometries.
Definition IndexedNestedRingTester.h:40
Contains classes to implement a planar graph data structure.
Definition LineMergeDirectedEdge.h:32
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25