com.isti.util.gis
Class DistAz

java.lang.Object
  extended by com.isti.util.gis.DistAz

public class DistAz
extends java.lang.Object

c c Subroutine to calculate the Great Circle Arc distance c between two sets of geographic coordinates c c Equations take from Bullen, pages 154, 155 c c T. Owens, September 19, 1991 c Sept. 25 -- fixed az and baz calculations c P. Crotwell, Setember 27, 1995 Converted to c to fix annoying problem of fortran giving wrong answers if the input doesn't contain a decimal point. H. P. Crotwell, September 18, 1997 Java version for direct use in java programs. C. Groves, May 4, 2004 Added enough convenience constructors to choke a horse and made public double values use accessors so we can use this class as an immutable


Constructor Summary
DistAz(double lat1, double lon1, double lat2, double lon2)
          c lat1 => Latitude of first point (+N, -S) in degrees c lon1 => Longitude of first point (+E, -W) in degrees c lat2 => Latitude of second point c lon2 => Longitude of second point c c getDelta() => Great Circle Arc distance in degrees c getAz() => Azimuth from pt.
 
Method Summary
static double degreesToKilometers(double degrees)
           
 boolean equals(java.lang.Object o)
           
 double getAz()
           
 double getBaz()
           
 double getDelta()
           
 int hashCode()
           
static double kilometersToDegrees(double kilometers)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistAz

public DistAz(double lat1,
              double lon1,
              double lat2,
              double lon2)
c lat1 => Latitude of first point (+N, -S) in degrees c lon1 => Longitude of first point (+E, -W) in degrees c lat2 => Latitude of second point c lon2 => Longitude of second point c c getDelta() => Great Circle Arc distance in degrees c getAz() => Azimuth from pt. 1 to pt. 2 in degrees c getBaz() => Back Azimuth from pt. 2 to pt. 1 in degrees

Method Detail

getDelta

public double getDelta()

getAz

public double getAz()

getBaz

public double getBaz()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

degreesToKilometers

public static double degreesToKilometers(double degrees)

kilometersToDegrees

public static double kilometersToDegrees(double kilometers)

main

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