java.io.Serializable
, java.lang.Cloneable
, java.lang.Comparable<Coordinate>
public class CoordinateXY extends Coordinate
This data object is suitable for use with coordinate sequences dimension 3, measures 1.
The Coordinate.Z
field is visible, but intended to be ignored.
Coordinate.DimensionalComparator
Modifier and Type | Field | Description |
---|---|---|
static int |
M |
CoordinateXY does not support M measures.
|
static int |
X |
Standard ordinate index value for, where X is 0
|
static int |
Y |
Standard ordinate index value for, where Y is 1
|
static int |
Z |
CoordinateXY does not support Z values.
|
NULL_ORDINATE, x, y, z
Constructor | Description |
---|---|
CoordinateXY() |
Default constructor
|
CoordinateXY(double x,
double y) |
|
CoordinateXY(Coordinate coord) |
|
CoordinateXY(CoordinateXY coord) |
Modifier and Type | Method | Description |
---|---|---|
CoordinateXY |
copy() |
|
double |
getOrdinate(int ordinateIndex) |
Gets the ordinate value for the given index.
|
double |
getZ() |
The z-ordinate is not supported
|
void |
setCoordinate(Coordinate other) |
Sets this
Coordinate s (x,y,z) values to that of other . |
void |
setOrdinate(int ordinateIndex,
double value) |
Sets the ordinate for the given index
to a given value.
|
void |
setZ(double z) |
The z-ordinate is not supported
|
java.lang.String |
toString() |
Returns a
String of the form (x,y,z) . |
public static final int X
public static final int Y
public static final int Z
public static final int M
public CoordinateXY()
public CoordinateXY(double x, double y)
public CoordinateXY(Coordinate coord)
public CoordinateXY(CoordinateXY coord)
public CoordinateXY copy()
copy
in class Coordinate
public double getZ()
getZ
in class Coordinate
public void setZ(double z)
setZ
in class Coordinate
public void setCoordinate(Coordinate other)
Coordinate
Coordinate
s (x,y,z) values to that of other
.setCoordinate
in class Coordinate
other
- the Coordinate
to copypublic double getOrdinate(int ordinateIndex)
Coordinate
Coordinate.X
, Coordinate.Y
, and Coordinate.Z
.getOrdinate
in class Coordinate
ordinateIndex
- the ordinate indexpublic void setOrdinate(int ordinateIndex, double value)
Coordinate
Coordinate.X
, Coordinate.Y
, and Coordinate.Z
.setOrdinate
in class Coordinate
ordinateIndex
- the ordinate indexvalue
- the value to setpublic java.lang.String toString()
Coordinate
String
of the form (x,y,z) .toString
in class Coordinate
String
of the form (x,y,z)Copyright © 2018. All rights reserved.