public class DMSLatLonPoint
extends java.lang.Object
implements java.lang.Cloneable
Original code contributed by Colin Mummery (colin_mummery@yahoo.com)
Modifier and Type | Field and Description |
---|---|
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.
|
double |
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.
|
double |
lon_seconds
The number of seconds in the longitude.
|
Constructor and Description |
---|
DMSLatLonPoint()
Construct a default LatLonPoint with zero values.
|
DMSLatLonPoint(boolean lat_isnegative,
int lat_degrees,
int lat_minutes,
double lat_seconds,
boolean lon_isnegative,
int lon_degrees,
int lon_minutes,
double lon_seconds)
Construct a DMSLatLonPoint from raw int lat/lon.
|
DMSLatLonPoint(LatLonPoint llp)
Constructs a new DMSLatLonPoint given a LatLonPoint instance
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone the DMSLatLonPoint.
|
boolean |
equals(java.lang.Object obj)
Determines whether two DMSLatLonPoints are exactly equal.
|
double |
getDecimalLatitude()
Returns the latitude as decimal degrees.
|
double |
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 double |
normalize_value(double 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.
|
public boolean lat_isnegative
public int lat_degrees
public int lat_minutes
public double lat_seconds
public boolean lon_isnegative
public int lon_degrees
public int lon_minutes
public double lon_seconds
public DMSLatLonPoint()
public DMSLatLonPoint(boolean lat_isnegative, int lat_degrees, int lat_minutes, double lat_seconds, boolean lon_isnegative, int lon_degrees, int lon_minutes, double 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 instancepublic LatLonPoint getLatLonPoint()
public LatLonPoint getLatLonPoint(LatLonPoint llp)
llp
- the LatLonPoint to load up.public double getDecimalLatitude()
public double 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
- Objectpublic static final int normalize_value(int val)
val
- an int value for the minutes or secondspublic static final double normalize_value(double val)
val
- an double value for the minutes or secondspublic int hashCode()
hashCode
in class java.lang.Object
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details