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 intcurrentSegment(double[] coords)intcurrentSegment(float[] coords)intgetWindingRule()Returns the winding rule for determining the interior of the path.voidinit(LineString ls, AffineTransform at)booleanisDone()Tests if the iteration is complete.voidnext()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:
currentSegmentin 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:
getWindingRulein 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:
isDonein interfacePathIterator- Returns:
trueif all the segments have been read;falseotherwise.
-
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:
nextin interfacePathIterator
-
currentSegment
public int currentSegment(double[] coords)
- Specified by:
currentSegmentin interfacePathIterator- See Also:
PathIterator.currentSegment(double[])
-
-