|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.AndrewGray.geoutils.LatLong
class defining LatLong data type for storage
and manipulation of Latitude/Longitude pairs.
Constructors allow for a variety of initialisation
methods. Note that:
Longitudes;
Easterlies are positive, westerlies negative,
Latitudes;
Northerlies positive, southerlies negative.
| Constructor Summary | |
LatLong()
create LatLong initialised at the meridian and on equator |
|
LatLong(double lat,
double lon)
Create a LatLong from 2 doubles representing Radian lat/long |
|
LatLong(double lat,
double lon,
boolean degrees)
Create a LatLong from 2 doubles representing either Degrees or Radians lat/long |
|
LatLong(int[] lat,
int[] lon)
This contructor takes two int array of Lat and Long |
|
LatLong(int la_d,
int la_m,
int la_s,
int lo_d,
int lo_m,
int lo_s)
This contructor takes six ints as Lat(Degrees,Minutes) and Long(Degrees,Minutes) |
|
LatLong(java.lang.String raw)
create a new LatLong from a string of the format returned by getRawString |
|
| Method Summary | |
double |
getLatitude()
returns the latitude represented by this LatLong |
double |
getLatitudeD()
returns the latitude represented by this LatLong |
int[] |
getLatitudeDMS()
returns the latitude represented by this LatLong |
double |
getLongitude()
returns the longitude represented by this LatLong |
double |
getLongitudeD()
returns the longitude represented by this LatLong |
int[] |
getLongitudeDMS()
returns the longitude represented by this LatLong |
java.lang.String |
getRawString()
return String representation of this LatLong. |
boolean |
isExtremeLatitude()
Return true if this LatLong represents an extreme latitude. |
boolean |
isLatitudeNorth()
return true if latitude is North of equator |
boolean |
isLongitudeEast()
return true if longitude is East of meridian |
java.lang.String |
toString()
Produce human readable representation of this LatLong with degrees and minutes only. |
java.lang.String |
toStringL()
Produce a human readable representation of this LatLong with degrees, minutes and seconds. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LatLong()
public LatLong(double lat,
double lon)
lat - the number of radians of latitudelon - the number of radians of longitude
public LatLong(double lat,
double lon,
boolean degrees)
lat - latitude valuelon - longitude valuedegrees - is true then values are in degrees, otherwise radians
public LatLong(int la_d,
int la_m,
int la_s,
int lo_d,
int lo_m,
int lo_s)
la_d - Degrees of latitudela_m - Minutes of latitudela_s - Seconds of latitudelo_d - Degrees of longitudelo_m - minutes of longitudelo_s - Seconds of longitude
public LatLong(int[] lat,
int[] lon)
throws java.lang.IllegalArgumentException
lat - Degrees of latitudelon - Degrees of longitude
public LatLong(java.lang.String raw)
throws java.lang.IllegalArgumentException,
java.lang.NumberFormatException
raw - the rawString to convert.java.lang.IllegalArgumentException - if the string does not contain two colon separated numbersjava.lang.NumberFormatException - if the two number are not valid longs| Method Detail |
public double getLatitude()
public double getLongitude()
public double getLatitudeD()
public double getLongitudeD()
public int[] getLatitudeDMS()
public int[] getLongitudeDMS()
public boolean isLatitudeNorth()
public boolean isLongitudeEast()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringL()
public boolean isExtremeLatitude()
public java.lang.String getRawString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||