java.io.Serializable
, CoordinateSequenceFactory
public class PackedCoordinateSequenceFactory extends java.lang.Object implements CoordinateSequenceFactory, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
static int |
DOUBLE |
|
static PackedCoordinateSequenceFactory |
DOUBLE_FACTORY |
|
static int |
FLOAT |
|
static PackedCoordinateSequenceFactory |
FLOAT_FACTORY |
Constructor | Description |
---|---|
PackedCoordinateSequenceFactory() |
Creates a new PackedCoordinateSequenceFactory
of type DOUBLE.
|
PackedCoordinateSequenceFactory(int type) |
Creates a new PackedCoordinateSequenceFactory
of the given type.
|
Modifier and Type | Method | Description |
---|---|---|
CoordinateSequence |
create(double[] packedCoordinates,
int dimension) |
Create a packed coordinate sequence from the provided array.
|
CoordinateSequence |
create(double[] packedCoordinates,
int dimension,
int measures) |
Create a packed coordinate sequence from the provided array.
|
CoordinateSequence |
create(float[] packedCoordinates,
int dimension) |
Create a packed coordinate sequence from the provided array.
|
CoordinateSequence |
create(float[] packedCoordinates,
int dimension,
int measures) |
|
CoordinateSequence |
create(int size,
int dimension) |
Creates a
CoordinateSequence of the specified size and dimension. |
CoordinateSequence |
create(int size,
int dimension,
int measures) |
Creates a
CoordinateSequence of the specified size and dimension with measure support. |
CoordinateSequence |
create(Coordinate[] coordinates) |
Returns a
CoordinateSequence based on the given array. |
CoordinateSequence |
create(CoordinateSequence coordSeq) |
Creates a
CoordinateSequence which is a copy
of the given CoordinateSequence . |
int |
getType() |
Returns the type of packed coordinate sequences this factory builds, either
PackedCoordinateSequenceFactory#Float or
PackedCoordinateSequenceFactory#Double
|
public static final int DOUBLE
public static final int FLOAT
public static final PackedCoordinateSequenceFactory DOUBLE_FACTORY
public static final PackedCoordinateSequenceFactory FLOAT_FACTORY
public PackedCoordinateSequenceFactory()
public PackedCoordinateSequenceFactory(int type)
public int getType()
public CoordinateSequence create(Coordinate[] coordinates)
CoordinateSequenceFactory
CoordinateSequence
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.create
in interface CoordinateSequenceFactory
coordinates
- the coordinatesCoordinateSequenceFactory.create(org.locationtech.jts.geom.Coordinate[])
public 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(double[] packedCoordinates, int dimension)
packedCoordinates
- dimension
- public CoordinateSequence create(double[] packedCoordinates, int dimension, int measures)
packedCoordinates
- dimension
- measures
- public CoordinateSequence create(float[] packedCoordinates, int dimension)
packedCoordinates
- dimension
- public CoordinateSequence create(float[] packedCoordinates, int dimension, int measures)
packedCoordinates
- dimension
- measures
- public CoordinateSequence create(int size, int dimension)
CoordinateSequenceFactory
CoordinateSequence
of the specified size and dimension.
For this to be useful, the CoordinateSequence
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.
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)CoordinateSequenceFactory.create(int, int, int)
Copyright © 2018. All rights reserved.