|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.geom.Coordinate
org.hibernate.spatial.jts.mgeom.MCoordinate
public class MCoordinate
This coordinate class supports 4D coordinates, where the first 3 measures (x,y,z) are coordinates in a 3 dimensional space (cartesian for example), and the fourth is a measure value used for linear referencing. Note that the measure value is independent of whether the (x,y,z) values are used. For example, the z value can not be used while the measure value is used.
While this class extends the Coordinate class, it can be used seamlessly as a substitute in the event that the Measure value is not used. In these cases the Measure value shall simply be Double.NaN
Coordinate
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class com.vividsolutions.jts.geom.Coordinate |
---|
com.vividsolutions.jts.geom.Coordinate.DimensionalComparator |
Field Summary | |
---|---|
double |
m
|
Fields inherited from class com.vividsolutions.jts.geom.Coordinate |
---|
NULL_ORDINATE, x, X, y, Y, z, Z |
Constructor Summary | |
---|---|
MCoordinate()
Default constructor |
|
MCoordinate(com.vividsolutions.jts.geom.Coordinate coord)
|
|
MCoordinate(double x,
double y)
|
|
MCoordinate(double x,
double y,
double z,
double m)
|
|
MCoordinate(MCoordinate coord)
|
Method Summary | |
---|---|
static MCoordinate |
convertCoordinate(com.vividsolutions.jts.geom.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(com.vividsolutions.jts.geom.Coordinate other)
|
boolean |
equals3DWithMeasure(com.vividsolutions.jts.geom.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()
|
Methods inherited from class com.vividsolutions.jts.geom.Coordinate |
---|
clone, compareTo, distance, equals2D, equals3D, hashCode, hashCode, setCoordinate |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double m
Constructor Detail |
---|
public MCoordinate()
public MCoordinate(double x, double y, double z, double m)
public MCoordinate(double x, double y)
public MCoordinate(com.vividsolutions.jts.geom.Coordinate coord)
public MCoordinate(MCoordinate coord)
Method Detail |
---|
public double getOrdinate(int ordinateIndex)
getOrdinate
in class com.vividsolutions.jts.geom.Coordinate
ordinateIndex
- the desired ordinate index.
public void setOrdinate(int ordinateIndex, double value)
setOrdinate
in class com.vividsolutions.jts.geom.Coordinate
ordinateIndex
- the desired ordinate index.value
- the new ordinate value
java.lang.IllegalArgumentException
- if the ordinateIndex value is incorrectgetOrdinate(int)
public boolean equals2DWithMeasure(com.vividsolutions.jts.geom.Coordinate other)
public boolean equals3DWithMeasure(com.vividsolutions.jts.geom.Coordinate other)
public boolean equals(java.lang.Object other)
equals
in class com.vividsolutions.jts.geom.Coordinate
public java.lang.String toString()
toString
in class com.vividsolutions.jts.geom.Coordinate
public static MCoordinate convertCoordinate(com.vividsolutions.jts.geom.Coordinate coordinate)
coordinate
- The coordinate to be converted
coordinate
parameterpublic static MCoordinate create2dWithMeasure(double x, double y, double m)
x
- the x coordinate valuey
- the y coordinate valuem
- the lrs measure value
public static MCoordinate create2d(double x, double y)
x
- the x coordinate valuey
- the y coordinate value
public 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 value
public static MCoordinate create3d(double x, double y, double z)
x
- the x coordinate valuey
- the y coordinate valuez
- the z coordinate value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |