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) // warning C4251: needs to have dll-interface to be used by clients of class
41 class GeometryFactory;
45 namespace planargraph {
102 typedef std::list<planargraph::DirectedEdge*> DirEdgeList;
103 typedef std::vector< DirEdgeList* > Sequences;
107 unsigned int lineCount;
109 std::unique_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);
209 sequencedGeometry(
nullptr),
210 isSequenceableVar(
false)
235 return isSequenceableVar;
252 template <
class TargetContainer>
254 add(TargetContainer& geoms)
256 for(
typename TargetContainer::const_iterator i = geoms.begin(),
257 e = geoms.end(); i != e; ++i) {
289 return sequencedGeometry.release();
292 return sequencedGeometry.get();
305 #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:99
void filter(const geom::Geometry *g)
Definition: LineSequencer.h:268
geom::Geometry * getSequencedLineStrings(bool release=1)
Definition: LineSequencer.h:285
bool isSequenceable()
Definition: LineSequencer.h:232
Represents a directed edge in a PlanarGraph.
Definition: planargraph/DirectedEdge.h:46
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:187
Definition: LineString.h:69
A planar graph of edges that is analyzed to sew the edges together.
Definition: LineMergeGraph.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
void add(const geom::Geometry &geometry)
Definition: LineSequencer.h:247
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
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:53
void applyComponentFilter(T &f) const
Apply a fiter to each component of this geometry. The filter is expected to provide a ...
Definition: Geometry.h:751