Class PackedCoordinateSequenceFactory

Hierarchy: Object , PackedCoordinateSequenceFactory
All Implemented Interfaces: CoordinateSequenceFactory, Serializable
public class PackedCoordinateSequenceFactory
implements Serializable , CoordinateSequenceFactory
Builds packed array coordinate sequences. The array data type can be either double or float, and defaults to double.
public PackedCoordinateSequenceFactory()
Creates a new PackedCoordinateSequenceFactory of type DOUBLE.
public PackedCoordinateSequenceFactory(int type)
Creates a new PackedCoordinateSequenceFactory of the given type. Acceptable type values are PackedCoordinateSequenceFactory.FLOAT or PackedCoordinateSequenceFactory.DOUBLE
public int getType()
Gets the type of packed coordinate sequence this factory builds, either PackedCoordinateSequenceFactory.FLOAT or PackedCoordinateSequenceFactory.DOUBLE
Returns:
the type of packed array built
public CoordinateSequence create(Coordinate[] coordinates)
See also:
CoordinateSequenceFactory#create(Coordinate[])
public CoordinateSequence create(CoordinateSequence coordSeq)
See also:
CoordinateSequenceFactory#create(CoordinateSequence)
public CoordinateSequence create(double[] packedCoordinates, int dimension)
Creates a packed coordinate sequence of type DOUBLE from the provided array using the given coordinate dimension and a measure count of 0.
Parameters:
packedCoordinates - packedCoordinates the array containing coordinate values
dimension - dimension the coordinate dimension
Returns:
a packed coordinate sequence of type DOUBLE
public CoordinateSequence create(double[] packedCoordinates, int dimension, int measures)
Creates a packed coordinate sequence of type DOUBLE from the provided array using the given coordinate dimension and measure count.
Parameters:
packedCoordinates - packedCoordinates the array containing coordinate values
dimension - dimension the coordinate dimension
measures - measures the coordinate measure count
Returns:
a packed coordinate sequence of type DOUBLE
public CoordinateSequence create(float[] packedCoordinates, int dimension)
Creates a packed coordinate sequence of type FLOAT from the provided array.
Parameters:
packedCoordinates - packedCoordinates the array containing coordinate values
dimension - dimension the coordinate dimension
Returns:
a packed coordinate sequence of type FLOAT
public CoordinateSequence create(float[] packedCoordinates, int dimension, int measures)
Creates a packed coordinate sequence of type FLOAT from the provided array.
Parameters:
packedCoordinates - packedCoordinates the array containing coordinate values
dimension - dimension the coordinate dimension
measures - measures the coordinate measure count
Returns:
a packed coordinate sequence of type FLOAT
public CoordinateSequence create(int size, int dimension)
See also:
org.locationtech.jts.geom.CoordinateSequenceFactory#create(int, int)
public CoordinateSequence create(int size, int dimension, int measures)
See also:
org.locationtech.jts.geom.CoordinateSequenceFactory#create(int, int, int)