public class PackedCoordinateSequenceFactory extends Object implements CoordinateSequenceFactory, Serializable
double
or float
,
and defaults to double
.Modifier and Type | Field and Description |
---|---|
static int |
DOUBLE
Type code for arrays of type
double . |
static PackedCoordinateSequenceFactory |
DOUBLE_FACTORY
A factory using array type
DOUBLE |
static int |
FLOAT
Type code for arrays of type
float . |
static PackedCoordinateSequenceFactory |
FLOAT_FACTORY
A factory using array type
FLOAT |
Constructor and Description |
---|
PackedCoordinateSequenceFactory()
Creates a new PackedCoordinateSequenceFactory
of type DOUBLE.
|
PackedCoordinateSequenceFactory(int type)
Creates a new PackedCoordinateSequenceFactory
of the given type.
|
Modifier and Type | Method and Description |
---|---|
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 . |
CoordinateSequence |
create(double[] packedCoordinates,
int dimension)
Creates a packed coordinate sequence of type
DOUBLE
from the provided array
using the given coordinate dimension and a measure count of 0. |
CoordinateSequence |
create(double[] packedCoordinates,
int dimension,
int measures)
Creates a packed coordinate sequence of type
DOUBLE
from the provided array
using the given coordinate dimension and measure count. |
CoordinateSequence |
create(float[] packedCoordinates,
int dimension)
Creates a packed coordinate sequence of type
FLOAT
from the provided array. |
CoordinateSequence |
create(float[] packedCoordinates,
int dimension,
int measures)
Creates a packed coordinate sequence of type
FLOAT
from the provided array. |
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. |
int |
getType()
|
public static final int DOUBLE
double
.public static final int FLOAT
float
.public static final PackedCoordinateSequenceFactory DOUBLE_FACTORY
DOUBLE
public static final PackedCoordinateSequenceFactory FLOAT_FACTORY
FLOAT
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(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(CoordinateSequence)
public CoordinateSequence create(double[] packedCoordinates, int dimension)
DOUBLE
from the provided array
using the given coordinate dimension and a measure count of 0.packedCoordinates
- the array containing coordinate valuesdimension
- the coordinate dimensionDOUBLE
public CoordinateSequence create(double[] packedCoordinates, int dimension, int measures)
DOUBLE
from the provided array
using the given coordinate dimension and measure count.packedCoordinates
- the array containing coordinate valuesdimension
- the coordinate dimensionmeasures
- the coordinate measure countDOUBLE
public CoordinateSequence create(float[] packedCoordinates, int dimension)
FLOAT
from the provided array.packedCoordinates
- the array containing coordinate valuesdimension
- the coordinate dimensionFLOAT
public CoordinateSequence create(float[] packedCoordinates, int dimension, int measures)
FLOAT
from the provided array.packedCoordinates
- the array containing coordinate valuesdimension
- the coordinate dimensionmeasures
- the coordinate measure countFLOAT
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 © 2024. All rights reserved.