org.geotools.geometry.jts
Class LineIterator2

java.lang.Object
  extended by org.geotools.geometry.jts.LineIterator2
All Implemented Interfaces:
java.awt.geom.PathIterator

public final class LineIterator2
extends java.lang.Object
implements java.awt.geom.PathIterator

A path iterator for the LiteShape class, specialized to iterate over LineString object.

Version:
$Id: LineIterator2.java 30648 2008-06-12 19:22:35Z acuster $
Author:
Andrea Aime, simone giannecchini

Field Summary
 
Fields inherited from interface java.awt.geom.PathIterator
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO
 
Constructor Summary
LineIterator2()
           
 
Method Summary
 int currentSegment(double[] coords)
           
 int currentSegment(float[] coords)
           
 int getWindingRule()
          Returns the winding rule for determining the interior of the path.
 void init(com.vividsolutions.jts.geom.LineString ls, java.awt.geom.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineIterator2

public LineIterator2()
Method Detail

currentSegment

public int currentSegment(float[] coords)
Specified by:
currentSegment in interface java.awt.geom.PathIterator
See Also:
PathIterator.currentSegment(float[])

init

public void init(com.vividsolutions.jts.geom.LineString ls,
                 java.awt.geom.AffineTransform at)
Parameters:
ls -
at -

getWindingRule

public int getWindingRule()
Returns the winding rule for determining the interior of the path.

Specified by:
getWindingRule in interface java.awt.geom.PathIterator
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 interface java.awt.geom.PathIterator
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 interface java.awt.geom.PathIterator

currentSegment

public int currentSegment(double[] coords)
Specified by:
currentSegment in interface java.awt.geom.PathIterator
See Also:
PathIterator.currentSegment(double[])


Copyright © 1996-2010 Geotools. All Rights Reserved.