Package org.locationtech.jts.geom
Interface CoordinateSequenceFactory
-
- All Known Implementing Classes:
CoordinateArraySequenceFactory,PackedCoordinateSequenceFactory
public interface CoordinateSequenceFactoryA factory to create concrete instances ofCoordinateSequences. Used to configureGeometryFactorys to provide specific kinds of CoordinateSequences.- Version:
- 1.7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CoordinateSequencecreate(int size, int dimension)Creates aCoordinateSequenceof the specified size and dimension.default CoordinateSequencecreate(int size, int dimension, int measures)Creates aCoordinateSequenceof the specified size and dimension with measure support.CoordinateSequencecreate(Coordinate[] coordinates)Returns aCoordinateSequencebased on the given array.CoordinateSequencecreate(CoordinateSequence coordSeq)Creates aCoordinateSequencewhich is a copy of the givenCoordinateSequence.
-
-
-
Method Detail
-
create
CoordinateSequence create(Coordinate[] coordinates)
Returns aCoordinateSequencebased on the given array. Whether the array is copied or simply referenced is implementation-dependent. This method must handle null arguments by creating an empty sequence.- Parameters:
coordinates- the coordinates
-
create
CoordinateSequence create(CoordinateSequence coordSeq)
Creates aCoordinateSequencewhich is a copy of the givenCoordinateSequence. This method must handle null arguments by creating an empty sequence.- Parameters:
coordSeq- the coordinate sequence to copy
-
create
CoordinateSequence create(int size, int dimension)
Creates aCoordinateSequenceof the specified size and dimension. For this to be useful, theCoordinateSequenceimplementation must be mutable.If the requested dimension is larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.
- Parameters:
size- the number of coordinates in the sequencedimension- the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)
-
create
default CoordinateSequence create(int size, int dimension, int measures)
Creates aCoordinateSequenceof the specified size and dimension with measure support. For this to be useful, theCoordinateSequenceimplementation must be mutable.If the requested dimension or measures are larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.
- Parameters:
size- the number of coordinates in the sequencedimension- the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)measures- the number of measures of the coordinates in the sequence (if user-specifiable, otherwise ignored)
-
-