|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gavaghan.geodesy.GlobalCoordinates
org.gavaghan.geodesy.GlobalPosition
public class GlobalPosition
Encapsulates a three dimensional location on a globe (GlobalCoordinates combined with an elevation in meters above a reference ellipsoid).
See documentation for GlobalCoordinates for details on how latitude and longitude measurements are canonicalized.
Constructor Summary | |
---|---|
GlobalPosition(double latitude,
double longitude,
double elevation)
Creates a new instance of GlobalPosition. |
|
GlobalPosition(GlobalCoordinates coords,
double elevation)
Creates a new instance of GlobalPosition. |
Method Summary | |
---|---|
int |
compareTo(GlobalPosition other)
Compare this position to another. |
boolean |
equals(java.lang.Object obj)
Compare this position to another object for equality. |
double |
getElevation()
Get elevation. |
int |
hashCode()
Get a hash code for this position. |
void |
setElevation(double elevation)
Set the elevation. |
java.lang.String |
toString()
Get position as a string. |
Methods inherited from class org.gavaghan.geodesy.GlobalCoordinates |
---|
compareTo, getLatitude, getLongitude, setLatitude, setLongitude |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GlobalPosition(double latitude, double longitude, double elevation)
latitude
- latitude in degreeslongitude
- longitude in degreeselevation
- elevation, in meters, above the reference ellipsoidpublic GlobalPosition(GlobalCoordinates coords, double elevation)
coords
- coordinates of the positionelevation
- elevation, in meters, above the reference ellipsoidMethod Detail |
---|
public double getElevation()
public void setElevation(double elevation)
elevation
- elevation about the ellipsoid in meters.public int compareTo(GlobalPosition other)
other
- instance to compare to
public int hashCode()
hashCode
in class GlobalCoordinates
public boolean equals(java.lang.Object obj)
equals
in class GlobalCoordinates
other
-
public java.lang.String toString()
toString
in class GlobalCoordinates
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |