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)
41 class GeometryFactory;
45 namespace planargraph {
96 typedef std::list<planargraph::DirectedEdge*> DirEdgeList;
97 typedef std::vector< DirEdgeList* > Sequences;
101 unsigned int lineCount;
103 std::unique_ptr<geom::Geometry> sequencedGeometry;
104 bool isSequenceableVar;
107 void computeSequence();
108 Sequences* findSequences();
111 void delAll(Sequences&);
128 geom::Geometry* buildSequencedGeometry(
const Sequences& sequences);
135 DirEdgeList::iterator lit,
136 bool expectedClosed);
167 DirEdgeList* orient(DirEdgeList* seq);
177 DirEdgeList* reverse(DirEdgeList& seq);
203 sequencedGeometry(
nullptr),
204 isSequenceableVar(
false)
230 return isSequenceableVar;
248 template <
class TargetContainer>
250 add(TargetContainer& geoms)
252 for(
typename TargetContainer::const_iterator i = geoms.begin(),
253 e = geoms.end(); i != e; ++i) {
285 return sequencedGeometry.release();
288 return sequencedGeometry.get();
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
void applyComponentFilter(T &f) const
Apply a filter to each component of this geometry. The filter is expected to provide a ....
Definition: Geometry.h:768
Definition: LineString.h:68
A planar graph of edges that is analyzed to sew the edges together.
Definition: LineMergeGraph.h:59
Builds a sequence from a set of LineStrings so that they are ordered end to end.
Definition: LineSequencer.h:93
geom::Geometry * getSequencedLineStrings(bool release=1)
Returns the LineString or MultiLineString built by the sequencing process, if one exists.
Definition: LineSequencer.h:281
bool isSequenceable()
Tests whether the arrangement of linestrings has a valid sequence.
Definition: LineSequencer.h:227
void add(const geom::Geometry &geometry)
Adds a Geometry to be sequenced.
Definition: LineSequencer.h:243
void filter(const geom::Geometry *g)
Act as a GeometryComponentFilter so to extract the linearworks.
Definition: LineSequencer.h:264
static bool isSequenced(const geom::Geometry *geom)
Tests whether a Geometry is sequenced correctly.
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:53
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26