|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.proj.coords.DMSLatLonPoint
Encapsulates a latitude and longitude coordinate in degrees, minutes and seconds as well as the sign.
Original code contributed by Colin Mummery (colin_mummery@yahoo.com)
Field Summary | |
int |
lat_degrees
The number of degrees in the latitude. |
boolean |
lat_isnegative
Indicates if the latitude is negative, the actual int values are always positive. |
int |
lat_minutes
The number of minutes in the latitude. |
float |
lat_seconds
The number of seconds in the latitude. |
int |
lon_degrees
The number of degrees in the longitude. |
boolean |
lon_isnegative
Indicates if the longitude is negative, the actual int values are always positive. |
int |
lon_minutes
The number of minutes in the longitude. |
float |
lon_seconds
The number of seconds in the longitude. |
Constructor Summary | |
DMSLatLonPoint()
Construct a default LatLonPoint with zero values. |
|
DMSLatLonPoint(boolean lat_isnegative,
int lat_degrees,
int lat_minutes,
float lat_seconds,
boolean lon_isnegative,
int lon_degrees,
int lon_minutes,
float lon_seconds)
Construct a DMSLatLonPoint from raw int lat/lon. |
|
DMSLatLonPoint(LatLonPoint llp)
Constructs a new DMSLatLonPoint given a LatLonPoint instance |
Method Summary | |
java.lang.Object |
clone()
Clone the DMSLatLonPoint. |
boolean |
equals(java.lang.Object obj)
Determines whether two DMSLatLonPoints are exactly equal. |
float |
getDecimalLatitude()
Returns the latitude as decimal degrees. |
float |
getDecimalLongitude()
Returns the longitude as decimal degrees. |
LatLonPoint |
getLatLonPoint()
Return a LatLonPoint from this DMSLatLonPoint. |
LatLonPoint |
getLatLonPoint(LatLonPoint llp)
Return a LatLonPoint from this DMSLatLonPoint. |
int |
hashCode()
Generate a hash value for the point. |
static float |
normalize_value(float val)
Sets the minutes and seconds to something sane. |
static int |
normalize_value(int val)
Sets the minutes and seconds to something sane. |
void |
setDMSLatLon(DMSLatLonPoint llpt)
Set DMSLatLonPoint. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public boolean lat_isnegative
public int lat_degrees
public int lat_minutes
public float lat_seconds
public boolean lon_isnegative
public int lon_degrees
public int lon_minutes
public float lon_seconds
Constructor Detail |
public DMSLatLonPoint()
public DMSLatLonPoint(boolean lat_isnegative, int lat_degrees, int lat_minutes, float lat_seconds, boolean lon_isnegative, int lon_degrees, int lon_minutes, float lon_seconds)
lat_isnegative
- boolean value indicating the sign of the
latitudelat_degrees
- integer number of degrees in latitudelat_minutes
- integer number of minutes in latitudelat_seconds
- float number of seconds in latitudelon_isnegative
- boolean value indicating the sign of the
longitudelon_degrees
- integer number of degrees in longitudelon_minutes
- integer number of minutes in longitudelon_seconds
- float number of seconds in longitudepublic DMSLatLonPoint(LatLonPoint llp)
llp
- A LatLonPoint instanceMethod Detail |
public LatLonPoint getLatLonPoint()
public LatLonPoint getLatLonPoint(LatLonPoint llp)
llp
- the LatLonPoint to load up.
public float getDecimalLatitude()
public float getDecimalLongitude()
public java.lang.String toString()
toString
in class java.lang.Object
public void setDMSLatLon(DMSLatLonPoint llpt)
llpt
- DMSLatLonPointpublic java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object
public static final int normalize_value(int val)
val
- an int value for the minutes or seconds
public static final float normalize_value(float val)
val
- an float value for the minutes or seconds
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |