#include <LinearIterator.h>
Public Member Functions | |
LinearIterator (const geom::Geometry *linear) | |
LinearIterator (const geom::Geometry *linear, const LinearLocation &start) | |
LinearIterator (const geom::Geometry *linear, unsigned int componentIndex, unsigned int vertexIndex) | |
bool | hasNext () const |
void | next () |
bool | isEndOfLine () const |
unsigned int | getComponentIndex () const |
unsigned int | getVertexIndex () const |
const geom::LineString * | getLine () const |
geom::Coordinate | getSegmentStart () const |
geom::Coordinate | getSegmentEnd () const |
The standard usage pattern for a LinearIterator is:
for (LinearIterator it = new LinearIterator(...); it.hasNext(); it.next()) { ... int ci = it.getComponentIndex(); // for example int vi = it.getVertexIndex(); // for example ... }
|
Creates an iterator initialized to the start of a linear Geometry
|
|
Creates an iterator starting at a LinearLocation on a linear Geometry
|
|
Creates an iterator starting at a component and vertex in a linear Geometry
|
|
The component index of the vertex the iterator is currently at.
|
|
Gets the LineString component the iterator is current at.
|
|
Gets the second Coordinate of the current segment. (the coordinate of the next vertex). If the iterator is at the end of a line,
|
|
Gets the first Coordinate of the current segment. (the coordinate of the current vertex).
|
|
The vertex index of the vertex the iterator is currently at.
|
|
Tests whether there are any vertices left to iterator over.
|
|
Checks whether the iterator cursor is pointing to the endpoint of a linestring.
|
|
Moves the iterator ahead to the next vertex and (possibly) linear component. |