Package org.locationtech.jts.geom
Interface CoordinateSequenceFactory
- All Known Implementing Classes:
CoordinateArraySequenceFactory
,DefaultCoordinateSequenceFactory
,ExtendedCoordinateSequenceFactory
,PackedCoordinateSequenceFactory
public interface CoordinateSequenceFactory
A factory to create concrete instances of
CoordinateSequence
s.
Used to configure GeometryFactory
s
to provide specific kinds of CoordinateSequences.- Version:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(int size, int dimension) Creates aCoordinateSequence
of the specified size and dimension.create
(Coordinate[] coordinates) Returns aCoordinateSequence
based on the given array.create
(CoordinateSequence coordSeq) Creates aCoordinateSequence
which is a copy of the givenCoordinateSequence
.
-
Method Details
-
create
Returns aCoordinateSequence
based 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
Creates aCoordinateSequence
which 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
Creates aCoordinateSequence
of the specified size and dimension. For this to be useful, theCoordinateSequence
implementation 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)
-