public class CoordinateXYM extends Coordinate
This data object is suitable for use with coordinate sequences with dimension = 3 and measures = 1.
The Coordinate.z field is visible, but intended to be ignored.
Coordinate.DimensionalComparator| Modifier and Type | Field and Description |
|---|---|
static int |
M
Standard ordinate index value for M in XYM sequences.
|
static int |
X
Standard ordinate index value for X
|
static int |
Y
Standard ordinate index value for Y
|
static int |
Z
CoordinateXYM does not support Z values.
|
NULL_ORDINATE, x, y, z| Constructor and Description |
|---|
CoordinateXYM()
Default constructor
|
CoordinateXYM(Coordinate coord)
Constructs a CoordinateXYM instance with the x and y ordinates of the given Coordinate.
|
CoordinateXYM(CoordinateXYM coord)
Constructs a CoordinateXY instance with the x and y ordinates of the given CoordinateXYM.
|
CoordinateXYM(double x,
double y,
double m)
Constructs a CoordinateXYM instance with the given ordinates and measure.
|
| Modifier and Type | Method and Description |
|---|---|
CoordinateXYM |
copy()
Creates a copy of this CoordinateXYM.
|
double |
getM()
The m-measure, if available.
|
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
Coordinates (x,y,z) values to that of other. |
void |
setM(double m)
Sets the measure value, if supported.
|
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
|
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
This constant assumes XYM coordinate sequence definition. Check this assumption using
#getDimension() and #getMeasures() before use.
public CoordinateXYM()
public CoordinateXYM(double x,
double y,
double m)
x - the X ordinatey - the Y ordinatem - the M measure valuepublic CoordinateXYM(Coordinate coord)
coord - the coordinate providing the ordinatespublic CoordinateXYM(CoordinateXYM coord)
coord - the coordinate providing the ordinatespublic CoordinateXYM copy()
copy in class Coordinatepublic double getM()
getM in class Coordinatepublic void setM(double m)
CoordinatesetM in class Coordinatem - the value to set as Mpublic double getZ()
getZ in class Coordinatepublic void setZ(double z)
setZ in class Coordinatez - the value to set as Zpublic void setCoordinate(Coordinate other)
CoordinateCoordinates (x,y,z) values to that of other.setCoordinate in class Coordinateother - the Coordinate to copypublic double getOrdinate(int ordinateIndex)
CoordinateX, Y, and Z.getOrdinate in class CoordinateordinateIndex - the ordinate indexpublic void setOrdinate(int ordinateIndex,
double value)
CoordinateX, Y, and Z.setOrdinate in class CoordinateordinateIndex - the ordinate indexvalue - the value to setpublic String toString()
CoordinateString of the form (x,y,z) .toString in class CoordinateString of the form (x,y,z)Copyright © 2020. All rights reserved.