com.mizar.usaddress
Class GISCoordinate

java.lang.Object
  extended by com.mizar.usaddress.GISCoordinate

public class GISCoordinate
extends java.lang.Object


Nested Class Summary
static class GISCoordinate.Ellipsoid
           
 
Field Summary
static int Bessel
           
static int FAI_sphere
           
static int GRS80
           
static int International
           
static int Krasovsky
           
static int NAD27
           
static int NAD83
           
static int SPHERE
           
static int User
           
static int WGS66
           
static int WGS72
           
static int WGS84
           
 
Constructor Summary
GISCoordinate(double lat, double lon, boolean rad)
          in decimal degrees/rads if rad is true, the entered lat and lon are in radians rather than degrees.
GISCoordinate(java.lang.String lat, java.lang.String lon)
           
GISCoordinate(java.lang.String lat, java.lang.String latDir, java.lang.String lon, java.lang.String lonDir)
           
 
Method Summary
static java.lang.String decimalDegreesToDMS(double degdec)
           
static java.lang.String decimalDegreesToDMS(double degdec, int precision)
           
static GISCoordinate fromString(java.lang.String s)
           
 java.lang.String getLatDeg()
           
 double getLatInDecDeg()
           
 double getLatInRad()
           
 java.lang.String getLatMin()
           
 java.lang.String getLatSec()
           
 java.lang.String getLonDeg()
           
 double getLonInDecDeg()
           
 double getLonInRad()
           
 java.lang.String getLonMin()
           
 java.lang.String getLonSec()
           
 boolean getPrintLonFirst()
           
 java.lang.String getPrintSeperator()
           
static void main(java.lang.String[] args)
          A testing main
 GISCoordinate makeClone()
           
 void move(double distft, double direction, int model)
           
static double parseLatLong(java.lang.String str)
           
 void printDEGDEC(java.io.PrintStream ps)
           
 void printDEGMIN(java.io.PrintStream ps)
           
 void setCoordinates(java.lang.String lat, java.lang.String lon)
           
 void setCoordinates(java.lang.String lat, java.lang.String latDir, java.lang.String lon, java.lang.String lonDir)
           
 void setPrintLonFirst(boolean f)
           
 void setPrintSeperator(java.lang.String sep)
           
 java.lang.String standardDMSForm(java.lang.String coordinate)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SPHERE

public static final int SPHERE
See Also:
Constant Field Values

WGS84

public static final int WGS84
See Also:
Constant Field Values

NAD27

public static final int NAD27
See Also:
Constant Field Values

International

public static final int International
See Also:
Constant Field Values

Krasovsky

public static final int Krasovsky
See Also:
Constant Field Values

Bessel

public static final int Bessel
See Also:
Constant Field Values

WGS72

public static final int WGS72
See Also:
Constant Field Values

WGS66

public static final int WGS66
See Also:
Constant Field Values

FAI_sphere

public static final int FAI_sphere
See Also:
Constant Field Values

User

public static final int User
See Also:
Constant Field Values

NAD83

public static final int NAD83
See Also:
Constant Field Values

GRS80

public static final int GRS80
See Also:
Constant Field Values
Constructor Detail

GISCoordinate

public GISCoordinate(java.lang.String lat,
                     java.lang.String latDir,
                     java.lang.String lon,
                     java.lang.String lonDir)
              throws java.lang.Exception
Throws:
java.lang.Exception

GISCoordinate

public GISCoordinate(java.lang.String lat,
                     java.lang.String lon)
              throws java.lang.Exception
Parameters:
lat -
lon -
Throws:
java.lang.Exception

GISCoordinate

public GISCoordinate(double lat,
                     double lon,
                     boolean rad)
              throws java.lang.Exception
in decimal degrees/rads if rad is true, the entered lat and lon are in radians rather than degrees. otherwise they are in degrees

Throws:
java.lang.Exception
Method Detail

setCoordinates

public void setCoordinates(java.lang.String lat,
                           java.lang.String lon)
                    throws java.lang.Exception
Parameters:
lat -
lon -
Throws:
java.lang.Exception

setCoordinates

public void setCoordinates(java.lang.String lat,
                           java.lang.String latDir,
                           java.lang.String lon,
                           java.lang.String lonDir)
                    throws java.lang.Exception
Parameters:
lat -
latDir -
lon -
lonDir -
Throws:
java.lang.Exception

standardDMSForm

public java.lang.String standardDMSForm(java.lang.String coordinate)
Parameters:
coordinate -
Returns:

getLatInRad

public double getLatInRad()
Returns:
latitude in radians

getLonInRad

public double getLonInRad()

getLatInDecDeg

public double getLatInDecDeg()

getLonInDecDeg

public double getLonInDecDeg()

getLatDeg

public java.lang.String getLatDeg()
Returns:

getLatMin

public java.lang.String getLatMin()
Returns:

getLatSec

public java.lang.String getLatSec()
Returns:

getLonDeg

public java.lang.String getLonDeg()
Returns:

getLonMin

public java.lang.String getLonMin()
Returns:

getLonSec

public java.lang.String getLonSec()
Returns:

printDEGDEC

public void printDEGDEC(java.io.PrintStream ps)

printDEGMIN

public void printDEGMIN(java.io.PrintStream ps)

getPrintSeperator

public java.lang.String getPrintSeperator()

setPrintSeperator

public void setPrintSeperator(java.lang.String sep)

getPrintLonFirst

public boolean getPrintLonFirst()

setPrintLonFirst

public void setPrintLonFirst(boolean f)

move

public void move(double distft,
                 double direction,
                 int model)
          throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

fromString

public static GISCoordinate fromString(java.lang.String s)
                                throws java.lang.Exception
Throws:
java.lang.Exception

makeClone

public GISCoordinate makeClone()
                        throws java.lang.Exception
Throws:
java.lang.Exception

parseLatLong

public static double parseLatLong(java.lang.String str)
                           throws java.lang.Exception
Parameters:
str -
Returns:
Throws:
java.lang.Exception

decimalDegreesToDMS

public static java.lang.String decimalDegreesToDMS(double degdec,
                                                   int precision)
Parameters:
degdec -
precision -
Returns:

decimalDegreesToDMS

public static java.lang.String decimalDegreesToDMS(double degdec)
Parameters:
degdec -
Returns:

main

public static void main(java.lang.String[] args)
A testing main

Parameters:
args - not used