22 #include <geos/export.h>
24 #include <geos/operation/linemerge/LineMergeGraph.h>
25 #include <geos/geom/Geometry.h>
26 #include <geos/geom/LineString.h>
34 #pragma warning(disable: 4251)
40 class GeometryFactory;
44 namespace planargraph {
95 typedef std::list<planargraph::DirectedEdge*> DirEdgeList;
96 typedef std::vector< DirEdgeList* > Sequences;
100 unsigned int lineCount;
102 std::unique_ptr<geom::Geometry> sequencedGeometry;
103 bool isSequenceableVar;
106 void computeSequence();
107 Sequences* findSequences();
110 void delAll(Sequences&);
124 geom::Geometry* buildSequencedGeometry(
const Sequences& sequences);
131 DirEdgeList::iterator lit,
132 bool expectedClosed);
163 DirEdgeList* orient(DirEdgeList* seq);
173 DirEdgeList* reverse(DirEdgeList& seq);
199 sequencedGeometry(
nullptr),
200 isSequenceableVar(
false)
226 return isSequenceableVar;
244 template <
class TargetContainer>
246 add(TargetContainer& geoms)
248 for(
typename TargetContainer::const_iterator i = geoms.begin(),
249 e = geoms.end(); i != e; ++i) {
281 return sequencedGeometry.release();
284 return sequencedGeometry.get();
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
void applyComponentFilter(T &f) const
Apply a filter to each component of this geometry. The filter is expected to provide a ....
Definition: Geometry.h:806
Definition: LineString.h:66
A planar graph of edges that is analyzed to sew the edges together.
Definition: LineMergeGraph.h:58
Builds a sequence from a set of LineStrings so that they are ordered end to end.
Definition: LineSequencer.h:92
geom::Geometry * getSequencedLineStrings(bool release=1)
Returns the LineString or MultiLineString built by the sequencing process, if one exists.
Definition: LineSequencer.h:277
bool isSequenceable()
Tests whether the arrangement of linestrings has a valid sequence.
Definition: LineSequencer.h:223
void add(const geom::Geometry &geometry)
Adds a Geometry to be sequenced.
Definition: LineSequencer.h:239
void filter(const geom::Geometry *g)
Act as a GeometryComponentFilter so to extract the linearworks.
Definition: LineSequencer.h:260
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:45
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition: planargraph/Node.h:44
A subgraph of a PlanarGraph.
Definition: Subgraph.h:52
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25