java.io.Serializable
, java.lang.Cloneable
, CoordinateSequence
public static class PackedCoordinateSequence.Double extends PackedCoordinateSequence
PackedCoordinateSequence.Double, PackedCoordinateSequence.Float
M, X, Y, Z
Constructor | Description |
---|---|
Double(double[] coords,
int dimension,
int measures) |
Builds a new packed coordinate sequence
|
Double(float[] coordinates,
int dimension,
int measures) |
Builds a new packed coordinate sequence out of a float coordinate array
|
Double(int size,
int dimension,
int measures) |
Builds a new empty packed coordinate sequence of a given size and dimension
|
Double(Coordinate[] coordinates) |
Builds a new packed coordinate sequence out of a coordinate array
|
Double(Coordinate[] coordinates,
int dimension) |
Builds a new packed coordinate sequence out of a coordinate array
|
Double(Coordinate[] coordinates,
int dimension,
int measures) |
Builds a new packed coordinate sequence out of a coordinate array
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
clone() |
Deprecated.
|
PackedCoordinateSequence.Double |
copy() |
Returns a deep copy of this collection.
|
Envelope |
expandEnvelope(Envelope env) |
Expands the given
Envelope to include the coordinates in the sequence. |
Coordinate |
getCoordinateInternal(int i) |
|
double |
getOrdinate(int index,
int ordinate) |
Returns the ordinate of a coordinate in this sequence.
|
double[] |
getRawCoordinates() |
Gets the underlying array containing the coordinate values.
|
void |
setOrdinate(int index,
int ordinate,
double value) |
Sets the ordinate of a coordinate in this sequence.
|
int |
size() |
Returns the number of coordinates in this sequence.
|
createCoordinate, getM, getZ, hasM, hasZ
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCoordinate, getCoordinate, getCoordinateCopy, getDimension, getMeasures, getX, getY, setX, setY, toCoordinateArray, toString
public Double(double[] coords, int dimension, int measures)
coords
- dimension
- measures
- public Double(float[] coordinates, int dimension, int measures)
coordinates
- dimensions
- measures
- public Double(Coordinate[] coordinates, int dimension)
coordinates
- dimension
- public Double(Coordinate[] coordinates, int dimension, int measures)
coordinates
- dimensions
- measures
- public Double(Coordinate[] coordinates)
coordinates
- public Double(int size, int dimension, int measures)
public Coordinate getCoordinateInternal(int i)
CoordinateSequence.getCoordinate(int)
public double[] getRawCoordinates()
public int size()
CoordinateSequence
CoordinateSequence.size()
public java.lang.Object clone()
CoordinateSequence
clone
in interface CoordinateSequence
clone
in class PackedCoordinateSequence
Object.clone()
public PackedCoordinateSequence.Double copy()
CoordinateSequence
copy
in interface CoordinateSequence
copy
in class PackedCoordinateSequence
public double getOrdinate(int index, int ordinate)
CoordinateSequence
Ordinates indices greater than 1 have user-defined semantics
(for instance, they may contain other dimensions or measure
values as described by CoordinateSequence.getDimension()
and CoordinateSequence.getMeasures()
).
getOrdinate
in interface CoordinateSequence
getOrdinate
in class PackedCoordinateSequence
index
- the coordinate index in the sequenceordinate
- the ordinate index in the coordinate (in range [0, dimension-1])Beware, for performance reasons the ordinate index is not checked, if
it's over dimensions you may not get an exception but a meaningless
value.
public void setOrdinate(int index, int ordinate, double value)
PackedCoordinateSequence
setOrdinate
in interface CoordinateSequence
setOrdinate
in class PackedCoordinateSequence
index
- the coordinate indexordinate
- the ordinate index in the coordinate, 0 based, smaller than the
number of dimensionsvalue
- the new ordinate valuecom.vividsolutions.jts.geom.PackedCoordinateSequence#setOrdinate(int,
int, double)
public Envelope expandEnvelope(Envelope env)
CoordinateSequence
Envelope
to include the coordinates in the sequence.
Allows implementing classes to optimize access to coordinate values.env
- the envelope to expandCopyright © 2018. All rights reserved.