|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.geoloc.LatLonPointImpl
public class LatLonPointImpl
Standard implementation of LatLonPoint. Longitude is always between -180 and +180 deg. Latitude is always between -90 and +90 deg.
LatLonPoint,
Serialized Form| Constructor Summary | |
|---|---|
LatLonPointImpl()
Default constructor with values 0,0. |
|
LatLonPointImpl(double lat,
double lon)
Creates a LatLonPoint from component latitude and longitude values. |
|
LatLonPointImpl(LatLonPoint pt)
Copy Constructor. |
|
| Method Summary | |
|---|---|
static boolean |
betweenLon(double lon,
double lonBeg,
double lonEnd)
Deprecated. |
boolean |
equals(LatLonPoint pt)
Check for equality with another point. |
boolean |
equals(java.lang.Object obj)
Check for equality with another object. |
static double |
getClockwiseDistanceTo(double from,
double to)
|
double |
getLatitude()
Returns the latitude, in degrees. |
double |
getLongitude()
Returns the longitude, in degrees. |
static double |
latNormal(double lat)
Normalize the latitude to lie between +/-90 |
static java.lang.String |
latToString(double lat,
int sigDigits)
Make a nicely formatted representation of a latitude, eg 40.34N or 12.9S. |
static double |
lonNormal(double lon)
Normalize the longitude to lie between +/-180 |
static double |
lonNormal(double lon,
double center)
put longitude into the range [center +/- 180] deg |
static double |
lonNormal360(double lon)
put longitude into the range [0, 360] deg |
static double |
lonNormalFrom(double lon,
double start)
put longitude into the range [start, start+360] deg |
static java.lang.String |
lonToString(double lon,
int sigDigits)
Make a nicely formatted representation of a longitude, eg 120.3W or 99.99E. |
static double |
range180(double lon)
put longitude into the range [-180, 180] deg |
void |
set(double lat,
double lon)
set lat, lon using double values |
void |
set(float lat,
float lon)
set lat, lon using float values |
void |
set(LatLonPoint pt)
set lat, lon using values of pt |
void |
setLatitude(double lat)
Set the latitude, in degrees. |
void |
setLongitude(double lon)
Set the longitude, in degrees. |
java.lang.String |
toString()
Default string representation |
java.lang.String |
toString(int sigDigits)
String representation in the form, eg 40.23N 105.1W |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LatLonPointImpl()
public LatLonPointImpl(LatLonPoint pt)
pt - point to copy
public LatLonPointImpl(double lat,
double lon)
lat - north latitude in degreeslon - east longitude in degrees| Method Detail |
|---|
public static boolean betweenLon(double lon,
double lonBeg,
double lonEnd)
lon - point to testlonBeg - beginning longitudelonEnd - ending longitude
public static double getClockwiseDistanceTo(double from,
double to)
public static double range180(double lon)
lon - lon to normalize
public static double lonNormal360(double lon)
lon - lon to normalize
public static double lonNormal(double lon,
double center)
lon - lon to normalizecenter - center point
public static double lonNormalFrom(double lon,
double start)
lon - lon to normalizestart - starting point
public static double lonNormal(double lon)
lon - east latitude in degrees
public static double latNormal(double lat)
lat - north latitude in degrees
public static java.lang.String latToString(double lat,
int sigDigits)
lat - the latitude.sigDigits - numer of significant digits to display.
public static java.lang.String lonToString(double lon,
int sigDigits)
lon - the longitude.sigDigits - numer of significant digits to display.
public double getLongitude()
getLongitude in interface LatLonPointpublic double getLatitude()
getLatitude in interface LatLonPointpublic void set(LatLonPoint pt)
pt - point to use
public void set(double lat,
double lon)
lat - lat valuelon - lon value
public void set(float lat,
float lon)
lat - lat valuelon - lon valuepublic void setLongitude(double lon)
lon - east longitude in degreespublic void setLatitude(double lat)
lat - north latitude in degreespublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - object to check
public boolean equals(LatLonPoint pt)
equals in interface LatLonPointpt - point to check
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(int sigDigits)
sigDigits - significant digits
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||