public class AxisPlaneCoordinateSequence extends Object implements CoordinateSequence
M, X, Y, Z
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a deep copy of this collection.
|
AxisPlaneCoordinateSequence |
copy()
Returns a deep copy of this collection.
|
Envelope |
expandEnvelope(Envelope env)
Expands the given
Envelope to include the coordinates in the sequence. |
Coordinate |
getCoordinate(int i)
Returns (possibly a copy of) the i'th coordinate in this sequence.
|
void |
getCoordinate(int index,
Coordinate coord)
Copies the i'th coordinate in the sequence to the supplied
Coordinate . |
Coordinate |
getCoordinateCopy(int i)
Returns a copy of the i'th coordinate in this sequence.
|
int |
getDimension()
Returns the dimension (number of ordinates in each coordinate) for this sequence.
|
double |
getOrdinate(int index,
int ordinateIndex)
Returns the ordinate of a coordinate in this sequence.
|
double |
getX(int index)
Returns ordinate X (0) of the specified coordinate.
|
double |
getY(int index)
Returns ordinate Y (1) of the specified coordinate.
|
double |
getZ(int index)
Returns ordinate Z of the specified coordinate if available.
|
static CoordinateSequence |
projectToXY(CoordinateSequence seq)
Creates a wrapper projecting to the XY plane.
|
static CoordinateSequence |
projectToXZ(CoordinateSequence seq)
Creates a wrapper projecting to the XZ plane.
|
static CoordinateSequence |
projectToYZ(CoordinateSequence seq)
Creates a wrapper projecting to the YZ plane.
|
void |
setOrdinate(int index,
int ordinateIndex,
double value)
Sets the value for a given ordinate of a coordinate in this sequence.
|
int |
size()
Returns the number of coordinates in this sequence.
|
Coordinate[] |
toCoordinateArray()
Returns (possibly copies of) the Coordinates in this collection.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createCoordinate, getM, getMeasures, hasM, hasZ
public static CoordinateSequence projectToXY(CoordinateSequence seq)
seq
- the sequence to be projectedpublic static CoordinateSequence projectToXZ(CoordinateSequence seq)
seq
- the sequence to be projectedpublic static CoordinateSequence projectToYZ(CoordinateSequence seq)
seq
- the sequence to be projectedpublic int getDimension()
CoordinateSequence
This total includes any measures, indicated by non-zero CoordinateSequence.getMeasures()
.
getDimension
in interface CoordinateSequence
public Coordinate getCoordinate(int i)
CoordinateSequence
Note that in the future the semantics of this method may change to guarantee that the Coordinate returned is always a copy. Callers should not to assume that they can modify a CoordinateSequence by modifying the object returned by this method.
getCoordinate
in interface CoordinateSequence
i
- the index of the coordinate to retrievepublic Coordinate getCoordinateCopy(int i)
CoordinateSequence
getCoordinateCopy
in interface CoordinateSequence
i
- the index of the coordinate to retrievepublic void getCoordinate(int index, Coordinate coord)
CoordinateSequence
Coordinate
. Only the first two dimensions are copied.getCoordinate
in interface CoordinateSequence
index
- the index of the coordinate to copycoord
- a Coordinate
to receive the valuepublic double getX(int index)
CoordinateSequence
getX
in interface CoordinateSequence
index
- the coordinate index in the sequencepublic double getY(int index)
CoordinateSequence
getY
in interface CoordinateSequence
index
- the coordinate index in the sequencepublic double getZ(int index)
CoordinateSequence
getZ
in interface CoordinateSequence
index
- the coordinate index in the sequencepublic double getOrdinate(int index, int ordinateIndex)
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
index
- the coordinate index in the sequenceordinateIndex
- the ordinate index in the coordinate (in range [0, dimension-1])public int size()
CoordinateSequence
size
in interface CoordinateSequence
public void setOrdinate(int index, int ordinateIndex, double value)
CoordinateSequence
setOrdinate
in interface CoordinateSequence
index
- the coordinate index in the sequenceordinateIndex
- the ordinate index in the coordinate (in range [0, dimension-1])value
- the new ordinate valuepublic Coordinate[] toCoordinateArray()
CoordinateSequence
toCoordinateArray
in interface CoordinateSequence
public Envelope expandEnvelope(Envelope env)
CoordinateSequence
Envelope
to include the coordinates in the sequence.
Allows implementing classes to optimize access to coordinate values.expandEnvelope
in interface CoordinateSequence
env
- the envelope to expandpublic Object clone()
CoordinateSequence
clone
in interface CoordinateSequence
clone
in class Object
public AxisPlaneCoordinateSequence copy()
CoordinateSequence
copy
in interface CoordinateSequence
Copyright © 2022. All rights reserved.