|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.drew.lang.GeoLocation
public final class GeoLocation
Represents a latitude and longitude pair, giving a position on earth in spherical coordinates. Values of latitude and longitude are given in degrees. This type is immutable.
| Constructor Summary | |
|---|---|
GeoLocation(double latitude,
double longitude)
Instantiates a new instance of GeoLocation. |
|
| Method Summary | |
|---|---|
static double[] |
decimalToDegreesMinutesSeconds(double decimal)
Converts a decimal degree angle into its corresponding DMS (degrees-minutes-seconds) component values, as a double array. |
static String |
decimalToDegreesMinutesSecondsString(double decimal)
Converts a decimal degree angle into its corresponding DMS (degrees-minutes-seconds) representation as a string, of format: -1° 23' 4.56" |
static Double |
degreesMinutesSecondsToDecimal(Rational degs,
Rational mins,
Rational secs,
boolean isNegative)
Converts DMS (degrees-minutes-seconds) rational values, as given in GpsDirectory,
into a single value in degrees, as a double. |
boolean |
equals(Object o)
|
double |
getLatitude()
|
double |
getLongitude()
|
int |
hashCode()
|
boolean |
isZero()
|
String |
toDMSString()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GeoLocation(double latitude,
double longitude)
GeoLocation.
latitude - the latitude, in degreeslongitude - the longitude, in degrees| Method Detail |
|---|
public double getLatitude()
public double getLongitude()
public boolean isZero()
public static String decimalToDegreesMinutesSecondsString(double decimal)
-1° 23' 4.56"
public static double[] decimalToDegreesMinutesSeconds(double decimal)
public static Double degreesMinutesSecondsToDecimal(Rational degs,
Rational mins,
Rational secs,
boolean isNegative)
GpsDirectory,
into a single value in degrees, as a double.
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object1.23, 4.56public String toDMSString()
-1° 23' 4.56", 54° 32' 1.92"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||