Class DefaultCSBuilder
- Object
-
- DefaultCSBuilder
-
-
Constructor Summary
Constructors Constructor Description DefaultCSBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateSequenceend()Stops the coordinate sequence building and returns the resultintgetDimension()Returns the dimension of the coordinate sequence we are building, -1 if there is nonedoublegetOrdinate(int ordinateIndex, int coordinateIndex)Gets an ordinate in the specified coordinateintgetSize()Returns the size of the coordinate sequence we are building, -1 if there is nonevoidsetOrdinate(double value, int ordinateIndex, int coordinateIndex)Sets and ordinate in the specified coordinatevoidsetOrdinate(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 itvoidstart(int size, int dimensions)Starts the building of a new coordinate sequence
-
-
-
Method Detail
-
start
public void start(int size, int dimensions)Description copied from interface:CSBuilderStarts the building of a new coordinate sequence- Specified by:
startin interfaceCSBuilder- Parameters:
size- - the number of coordinates in the coordinate sequencedimensions- - the dimension of the coordinates in the coordinate sequence, may be ignored if the coordinate sequence does not support variabile dimensions- See Also:
org.geotools.geometry.coordinatesequence.CSBuilder#start(int, int)
-
end
public CoordinateSequence end()
Description copied from interface:CSBuilderStops the coordinate sequence building and returns the result
-
setOrdinate
public void setOrdinate(double value, int ordinateIndex, int coordinateIndex)Description copied from interface:CSBuilderSets and ordinate in the specified coordinate- Specified by:
setOrdinatein interfaceCSBuilder- See Also:
org.geotools.geometry.coordinatesequence.CSBuilder#setOrdinate(double, int, int)
-
getOrdinate
public double getOrdinate(int ordinateIndex, int coordinateIndex)Description copied from interface:CSBuilderGets an ordinate in the specified coordinate- Specified by:
getOrdinatein interfaceCSBuilder- See Also:
org.geotools.geometry.coordinatesequence.CSBuilder#getOrdinate(int, int)
-
getSize
public int getSize()
Description copied from interface:CSBuilderReturns the size of the coordinate sequence we are building, -1 if there is none
-
getDimension
public int getDimension()
Description copied from interface:CSBuilderReturns the dimension of the coordinate sequence we are building, -1 if there is none- Specified by:
getDimensionin interfaceCSBuilder- See Also:
org.geotools.geometry.coordinatesequence.CSBuilder#getDimension()
-
setOrdinate
public void setOrdinate(CoordinateSequence sequence, double value, int ordinateIndex, int coordinateIndex)
Description copied from interface:CSBuilderUtility method that allows to set an ordinate in an already built coordinate sequence Needed because the CoordinateSequence interface does not expose it- Specified by:
setOrdinatein interfaceCSBuilder- See Also:
org.geotools.geometry.coordinatesequence.CSBuilder#setOrdinate(org.locationtech.jts.geom.CoordinateSequence, double, int, int)
-
-