20 #ifndef GEOS_LINEARREF_LINEARITERATOR_H
21 #define GEOS_LINEARREF_LINEARITERATOR_H
25 #include <geos/geom/Coordinate.h>
26 #include <geos/geom/Geometry.h>
27 #include <geos/geom/LineSegment.h>
28 #include <geos/linearref/LinearLocation.h>
50 class LinearIterator {
66 LinearIterator(
const geom::Geometry* linear,
const LinearLocation& start);
76 LinearIterator(
const geom::Geometry* linear,
size_t componentIndex,
size_t vertexIndex);
114 const geom::LineString*
getLine()
const;
134 static size_t segmentEndVertexIndex(
const LinearLocation& loc);
136 const geom::LineString* currentLine;
138 size_t componentIndex;
139 const geom::Geometry* linear;
140 const size_t numLines;
148 void loadCurrentLine();
158 #endif // GEOS_LINEARREF_LINEARITERATOR_H
size_t getComponentIndex() const
The component index of the vertex the iterator is currently at.
size_t getVertexIndex() const
The vertex index of the vertex the iterator is currently at.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:24
geom::Coordinate getSegmentStart() const
Gets the first geom::Coordinate of the current segment. (the coordinate of the current vertex).
bool hasNext() const
Tests whether there are any vertices left to iterator over.
const geom::LineString * getLine() const
Gets the geom::LineString component the iterator is current at.
void next()
Moves the iterator ahead to the next vertex and (possibly) linear component.
bool isEndOfLine() const
Checks whether the iterator cursor is pointing to the endpoint of a component geom::LineString.
LinearIterator(const geom::Geometry *linear)
Creates an iterator initialized to the start of a linear Geometry.
geom::Coordinate getSegmentEnd() const
Gets the second geom::Coordinate of the current segment. (the coordinate of the next vertex)....