|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.microedition.location.Coordinates
The Coordinates class represents coordinates as latitude-longitude-altitude values. The latitude and longitude values are expressed in degrees using floating point values. The degrees are in decimal values (rather than minutes/seconds). The coordinates are given using the WGS84 datum. This class is extracted from JSR179
| Field Summary | |
protected float |
altitude
|
static int |
DD_MM
Identifier for string coordinate representation Degrees, Minutes, decimal fractions of a minute |
static int |
DD_MM_SS
Identifier for string coordinate representation Degrees, Minutes, Seconds and decimal fractions of a second |
protected float |
latitude
|
protected float |
longitude
|
| Constructor Summary | |
Coordinates()
Constructs a new Coordinates object with the values specified. |
|
Coordinates(float latitude,
float longitude,
float altitude)
Constructs a new Coordinates object with the values specified. |
|
| Method Summary | |
float |
bearing(Coordinates to)
Calculates the great circle bearing between the two points. |
static String |
convert(float coordinate,
int outputType)
Converts a float representation of a coordinate with decimal degrees into a string representation |
static float |
convert(String coordinate,
int inputType)
Converts a String representation of a coordinate into the float representation as used in this API. |
float |
distance(Coordinates to)
Calculates the great circle distance between the two points. |
float |
getAltitude()
Returns the altitude component of this coordinate. |
float |
getLatitude()
Returns the latitude component of this coordinate. |
float |
getLongitude()
Returns the longitude component of this coordinate. |
void |
setAltitude(float altitude)
Sets the geodetic altitude for this point. |
void |
setLatitude(float latitude)
Sets the geodetic latitude for this point. |
void |
setLongitude(float longitude)
Sets the geodetic longitude for this point. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected float latitude
protected float longitude
protected float altitude
public static final int DD_MM
public static final int DD_MM_SS
| Constructor Detail |
public Coordinates()
public Coordinates(float latitude,
float longitude,
float altitude)
latitude - Description of the Parameterlongitude - Description of the Parameteraltitude - Description of the Parameter| Method Detail |
public float bearing(Coordinates to)
to - Description of the Parameter
public static float convert(String coordinate,
int inputType)
coordinate - Description of the ParameterinputType - Description of the Parameter
public float distance(Coordinates to)
to - Description of the Parameter
public static String convert(float coordinate,
int outputType)
coordinate - Description of the ParameteroutputType - Description of the Parameter
public float getAltitude()
public float getLatitude()
public float getLongitude()
public void setAltitude(float altitude)
altitude - The new altitude valuepublic void setLatitude(float latitude)
latitude - The new latitude valuepublic void setLongitude(float longitude)
longitude - The new longitude value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||