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
Builds a sequence from a set of LineStrings so that they are ordered end to end.
Definition: LineSequencer.h:100
void filter(const geom::Geometry *g)
Definition: LineSequencer.h:263
geom::Geometry * getSequencedLineStrings(bool release=1)
Definition: LineSequencer.h:281
bool isSequenceable()
Definition: LineSequencer.h:231
Represents a directed edge in a PlanarGraph.
Definition: planargraph/DirectedEdge.h:47
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:168
Definition: LineString.h:71
A planar graph of edges that is analyzed to sew the edges together.
Definition: LineMergeGraph.h:60
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
void add(const geom::Geometry &geometry)
Definition: LineSequencer.h:244
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition: planargraph/Node.h:46
A subgraph of a PlanarGraph.
Definition: Subgraph.h:54
void applyComponentFilter(T &f) const
Apply a fiter to each component of this geometry. The filter is expected to provide a ...
Definition: Geometry.h:686