Package org.locationtech.jts.geom.impl
Class CoordinateArraySequenceFactory
- java.lang.Object
-
- org.locationtech.jts.geom.impl.CoordinateArraySequenceFactory
-
- All Implemented Interfaces:
java.io.Serializable
,CoordinateSequenceFactory
public final class CoordinateArraySequenceFactory extends java.lang.Object implements CoordinateSequenceFactory, java.io.Serializable
CreatesCoordinateSequence
s represented as an array ofCoordinate
s.- Version:
- 1.7
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateSequence
create(int size, int dimension)
The created sequence dimension is clamped to be <= 3.CoordinateSequence
create(int size, int dimension, int measures)
Creates aCoordinateSequence
of the specified size and dimension with measure support.CoordinateSequence
create(Coordinate[] coordinates)
Returns aCoordinateArraySequence
based on the given array (the array is not copied).CoordinateSequence
create(CoordinateSequence coordSeq)
Creates aCoordinateSequence
which is a copy of the givenCoordinateSequence
.static CoordinateArraySequenceFactory
instance()
Returns the singleton instance ofCoordinateArraySequenceFactory
-
-
-
Method Detail
-
instance
public static CoordinateArraySequenceFactory instance()
Returns the singleton instance ofCoordinateArraySequenceFactory
-
create
public CoordinateSequence create(Coordinate[] coordinates)
Returns aCoordinateArraySequence
based on the given array (the array is not copied).- Specified by:
create
in interfaceCoordinateSequenceFactory
- Parameters:
coordinates
- the coordinates, which may not be null nor contain null elements
-
create
public CoordinateSequence create(CoordinateSequence coordSeq)
Description copied from interface:CoordinateSequenceFactory
Creates aCoordinateSequence
which is a copy of the givenCoordinateSequence
. This method must handle null arguments by creating an empty sequence.- Specified by:
create
in interfaceCoordinateSequenceFactory
- Parameters:
coordSeq
- the coordinate sequence to copy- See Also:
CoordinateSequenceFactory.create(org.locationtech.jts.geom.CoordinateSequence)
-
create
public CoordinateSequence create(int size, int dimension)
The created sequence dimension is clamped to be <= 3.- Specified by:
create
in interfaceCoordinateSequenceFactory
- Parameters:
size
- the number of coordinates in the sequencedimension
- the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)- See Also:
CoordinateSequenceFactory.create(int, int)
-
create
public CoordinateSequence create(int size, int dimension, int measures)
Description copied from interface:CoordinateSequenceFactory
Creates aCoordinateSequence
of the specified size and dimension with measure support. For this to be useful, theCoordinateSequence
implementation 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.
- Specified by:
create
in interfaceCoordinateSequenceFactory
- 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)
-
-