public class MCoordinate
extends Coordinate
com.vividsolutions.jts.geom.Coordinate
Modifier and Type | Field and Description |
---|---|
double |
m |
Constructor and Description |
---|
MCoordinate()
Default constructor
|
MCoordinate(Coordinate coord) |
MCoordinate(double x,
double y) |
MCoordinate(double x,
double y,
double z,
double m) |
Modifier and Type | Method and Description |
---|---|
static MCoordinate |
convertCoordinate(Coordinate coordinate)
Converts a standard Coordinate instance to an MCoordinate instance.
|
static MCoordinate |
create2d(double x,
double y)
A convenience method for creating a MCoordinate instance where there are
only 2 coordinates and an lrs measure value.
|
static MCoordinate |
create2dWithMeasure(double x,
double y,
double m)
A convenience method for creating a MCoordinate instance where there are
only 2 coordinates and an lrs measure value.
|
static MCoordinate |
create3d(double x,
double y,
double z)
A convenience method for creating a MCoordinate instance where there are
3 coordinates but no lrs measure value.
|
static MCoordinate |
create3dWithMeasure(double x,
double y,
double z,
double m)
A convenience method for creating a MCoordinate instance where there are
3 coordinates and an lrs measure value.
|
boolean |
equals(java.lang.Object other) |
boolean |
equals2DWithMeasure(Coordinate other) |
boolean |
equals3DWithMeasure(Coordinate other) |
double |
getOrdinate(int ordinateIndex)
TODO: I'd like to see this method added to the base Coordinate class
Returns the ordinate value specified in this Coordinate instance.
|
void |
setOrdinate(int ordinateIndex,
double value)
TODO: I'd like to see this method added to the base Coordinate class Sets
the value for a given ordinate.
|
java.lang.String |
toString() |
public MCoordinate()
public MCoordinate(double x, double y, double z, double m)
public MCoordinate(double x, double y)
public MCoordinate(Coordinate coord)
public double getOrdinate(int ordinateIndex)
ordinateIndex
- the desired ordinate index.public void setOrdinate(int ordinateIndex, double value)
ordinateIndex
- the desired ordinate index.value
- the new ordinate valuejava.lang.IllegalArgumentException
- if the ordinateIndex value is incorrectgetOrdinate(int)
public boolean equals2DWithMeasure(Coordinate other)
public boolean equals3DWithMeasure(Coordinate other)
public boolean equals(java.lang.Object other)
public java.lang.String toString()
public static MCoordinate convertCoordinate(Coordinate coordinate)
coordinate
- The coordinate to be convertedcoordinate
parameterpublic static MCoordinate create2dWithMeasure(double x, double y, double m)
x
- the x coordinate valuey
- the y coordinate valuem
- the lrs measure valuepublic static MCoordinate create2d(double x, double y)
x
- the x coordinate valuey
- the y coordinate valuepublic static MCoordinate create3dWithMeasure(double x, double y, double z, double m)
x
- the x coordinate valuey
- the y coordinate valuez
- the z coordinate valuem
- the lrs measure valuepublic static MCoordinate create3d(double x, double y, double z)
x
- the x coordinate valuey
- the y coordinate valuez
- the z coordinate value