uk.me.jstott.coordconv
Class LatitudeLongitude

java.lang.Object
  extended byuk.me.jstott.coordconv.LatitudeLongitude

public class LatitudeLongitude
extends java.lang.Object

An object to represent a latitude and longitude pair

Since:
0.1
Version:
0.2
Author:
Jonathan Stott

Constructor Summary
LatitudeLongitude(double lat, double lng)
          Construct a latitude and longitude pair
LatitudeLongitude(int degreesN, int minutesN, double secondsN, int degreesE, int minutesE, double secondsE)
          Construct a latitude and longitude pair
 
Method Summary
 double getLatitude()
          Get the latitude
 double getLongitude()
          Get the longitude
 void setLatitude(double d)
          Set the latitude
 void setLongitude(double d)
          Set the longitude
 java.lang.String toString()
          Get a string representation of the latitude and longitude in the form 52°39'27.2531"N 1°43'4.5177"E
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LatitudeLongitude

public LatitudeLongitude(double lat,
                         double lng)
Construct a latitude and longitude pair

Parameters:
lat - the latitude
lng - the longitude

LatitudeLongitude

public LatitudeLongitude(int degreesN,
                         int minutesN,
                         double secondsN,
                         int degreesE,
                         int minutesE,
                         double secondsE)
Construct a latitude and longitude pair

Parameters:
degreesN - degrees of latitude
minutesN - minutes of latitude
secondsN - seconds of latitude
degreesE - degrees of longitude
minutesE - minutes of longitude
secondsE - seconds of longitude
Method Detail

getLatitude

public double getLatitude()
Get the latitude

Returns:
the latitude

getLongitude

public double getLongitude()
Get the longitude

Returns:
the longitude

setLatitude

public void setLatitude(double d)
Set the latitude

Parameters:
d - the new value of the latitude

setLongitude

public void setLongitude(double d)
Set the longitude

Parameters:
d - the new value of the longitude

toString

public java.lang.String toString()
Get a string representation of the latitude and longitude in the form 52°39'27.2531"N 1°43'4.5177"E

Returns: