Package org.geotools.geometry.jts
Class LineIterator2
- Object
-
- LineIterator2
-
- All Implemented Interfaces:
PathIterator
public final class LineIterator2 extends Object implements PathIterator
A path iterator for the LiteShape class, specialized to iterate over LineString object.- Author:
- Andrea Aime, simone giannecchini
-
-
Field Summary
-
Fields inherited from interface PathIterator
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO
-
-
Constructor Summary
Constructors Constructor Description LineIterator2()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
currentSegment(double[] coords)
int
currentSegment(float[] coords)
int
getWindingRule()
Returns the winding rule for determining the interior of the path.void
init(LineString ls, AffineTransform at)
boolean
isDone()
Tests if the iteration is complete.void
next()
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.
-
-
-
Method Detail
-
currentSegment
public int currentSegment(float[] coords)
- Specified by:
currentSegment
in interfacePathIterator
- See Also:
PathIterator.currentSegment(float[])
-
init
public void init(LineString ls, AffineTransform at)
-
getWindingRule
public int getWindingRule()
Returns the winding rule for determining the interior of the path.- Specified by:
getWindingRule
in interfacePathIterator
- Returns:
- the winding rule.
- See Also:
PathIterator.WIND_EVEN_ODD
,PathIterator.WIND_NON_ZERO
-
isDone
public boolean isDone()
Tests if the iteration is complete.- Specified by:
isDone
in interfacePathIterator
- Returns:
true
if all the segments have been read;false
otherwise.
-
next
public void next()
Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.- Specified by:
next
in interfacePathIterator
-
currentSegment
public int currentSegment(double[] coords)
- Specified by:
currentSegment
in interfacePathIterator
- See Also:
PathIterator.currentSegment(double[])
-
-