org.gscg.common.geo
Class CalculateLatLonDistance

java.lang.Object
  extended byorg.gscg.common.geo.CalculateLatLonDistance
All Implemented Interfaces:
java.io.Serializable

public class CalculateLatLonDistance
extends java.lang.Object
implements java.io.Serializable

Calculates the distance between two lat/long points. The distance is returned in km.

Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl . The source code and binary code of this software is proprietary information of Delft University of Technology.

Since:
1.0.0
Version:
$Revision: 1.1 $ $Date: 2005/06/16 12:34:08 $
Author:
Stijn-Pieter van Houten
See Also:
Serialized Form

Constructor Summary
CalculateLatLonDistance()
          constructs a new CalculateLatLonDistance
 
Method Summary
 double getDistance(nl.tudelft.simulation.dsol.animation.LocatableInterface location1, nl.tudelft.simulation.dsol.animation.LocatableInterface location2)
           
 double getDistance(javax.vecmath.Point2d location1, javax.vecmath.Point2d location2)
          Returns the distance between two points (lat/lon) in kilometres.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalculateLatLonDistance

public CalculateLatLonDistance()
constructs a new CalculateLatLonDistance

Method Detail

getDistance

public double getDistance(nl.tudelft.simulation.dsol.animation.LocatableInterface location1,
                          nl.tudelft.simulation.dsol.animation.LocatableInterface location2)
Parameters:
location1 - location 1
location2 - location 2
Returns:
returns the distance

getDistance

public double getDistance(javax.vecmath.Point2d location1,
                          javax.vecmath.Point2d location2)
Returns the distance between two points (lat/lon) in kilometres.

Parameters:
location1 - location 1
location2 - location 2
Returns:
returns the distance in kilometres

main

public static void main(java.lang.String[] args)
Parameters:
args - command line arguments


Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.