org.geotools.geometry.coordinatesequence
Interface CSBuilder

All Known Implementing Classes:
DefaultCSBuilder, PackedCSBuilder

public interface CSBuilder

Author:
wolf TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Method Summary
 com.vividsolutions.jts.geom.CoordinateSequence end()
          Stops the coordinate sequence building and returns the result
 int getDimension()
          Returns the dimension of the coordinate sequence we are building, -1 if there is none
 double getOrdinate(int ordinateIndex, int coordinateIndex)
          Gets an ordinate in the specified coordinate
 int getSize()
          Returns the size of the coordinate sequence we are building, -1 if there is none
 void setOrdinate(com.vividsolutions.jts.geom.CoordinateSequence sequence, double value, int ordinateIndex, int coordinateIndex)
          Utility method that allows to set an ordinate in an already built coordinate sequence Needed because the CoordinateSequence interface does not expose it
 void setOrdinate(double value, int ordinateIndex, int coordinateIndex)
          Sets and ordinate in the specified coordinate
 void start(int size, int dimensions)
          Starts the building of a new coordinate sequence
 

Method Detail

start

public void start(int size,
                  int dimensions)
Starts the building of a new coordinate sequence

Parameters:
size - - the number of coordinates in the coordinate sequence
dimensions - - the dimension of the coordinates in the coordinate sequence, may be ignored if the coordinate sequence does not support variabile dimensions

end

public com.vividsolutions.jts.geom.CoordinateSequence end()
Stops the coordinate sequence building and returns the result

Returns:

setOrdinate

public void setOrdinate(double value,
                        int ordinateIndex,
                        int coordinateIndex)
Sets and ordinate in the specified coordinate

Parameters:
value -
ordinateIndex -
coordinateIndex -

setOrdinate

public void setOrdinate(com.vividsolutions.jts.geom.CoordinateSequence sequence,
                        double value,
                        int ordinateIndex,
                        int coordinateIndex)
Utility method that allows to set an ordinate in an already built coordinate sequence Needed because the CoordinateSequence interface does not expose it

Parameters:
sequence -
value -
ordinateIndex -
coordinateIndex -

getOrdinate

public double getOrdinate(int ordinateIndex,
                          int coordinateIndex)
Gets an ordinate in the specified coordinate

Parameters:
ordinateIndex -
coordinateIndex -

getSize

public int getSize()
Returns the size of the coordinate sequence we are building, -1 if there is none

Returns:

getDimension

public int getDimension()
Returns the dimension of the coordinate sequence we are building, -1 if there is none

Returns:


Copyright © GeoTools. All Rights Reserved.