public final class CoordinateArraySequenceFactory extends Object implements CoordinateSequenceFactory, Serializable
CoordinateSequence
s represented as an array of Coordinate
s.Modifier and Type | Method and Description |
---|---|
CoordinateSequence |
create(Coordinate[] coordinates)
Returns a
CoordinateArraySequence based on the given array (the array is
not copied). |
CoordinateSequence |
create(CoordinateSequence coordSeq)
Creates a
CoordinateSequence which is a copy
of the given CoordinateSequence . |
CoordinateSequence |
create(int size,
int dimension)
The created sequence dimension is clamped to be <= 3.
|
CoordinateSequence |
create(int size,
int dimension,
int measures)
Creates a
CoordinateSequence of the specified size and dimension with measure support. |
static CoordinateArraySequenceFactory |
instance()
Returns the singleton instance of
CoordinateArraySequenceFactory |
public static CoordinateArraySequenceFactory instance()
CoordinateArraySequenceFactory
public CoordinateSequence create(Coordinate[] coordinates)
CoordinateArraySequence
based on the given array (the array is
not copied).create
in interface CoordinateSequenceFactory
coordinates
- the coordinates, which may not be null nor contain null
elementspublic CoordinateSequence create(CoordinateSequence coordSeq)
CoordinateSequenceFactory
CoordinateSequence
which is a copy
of the given CoordinateSequence
.
This method must handle null arguments by creating an empty sequence.create
in interface CoordinateSequenceFactory
coordSeq
- the coordinate sequence to copyCoordinateSequenceFactory.create(org.locationtech.jts.geom.CoordinateSequence)
public CoordinateSequence create(int size, int dimension)
create
in interface CoordinateSequenceFactory
size
- the number of coordinates in the sequencedimension
- the dimension of the coordinates in the sequence (if user-specifiable,
otherwise ignored)CoordinateSequenceFactory.create(int, int)
public CoordinateSequence create(int size, int dimension, int measures)
CoordinateSequenceFactory
CoordinateSequence
of the specified size and dimension with measure support.
For this to be useful, the CoordinateSequence
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.
create
in interface CoordinateSequenceFactory
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)Copyright © 2024. All rights reserved.