com.nutiteq.components
Class WgsPoint

java.lang.Object
  extended by com.nutiteq.components.WgsPoint

public class WgsPoint
extends java.lang.Object

Point object for moving WGS84 coordinates between library and implementing application


Constructor Summary
WgsPoint(double lon, double lat)
           
 
Method Summary
static double distanceInMeters(WgsPoint p1, WgsPoint p2)
          Compute distance in meters between two points.
 boolean equals(java.lang.Object obj)
          Check if two WgsPoint objects refer to the same coordinates.
 double getLat()
          Get coordinate latitude
 double getLon()
          Get coordinate longitude
 int hashCode()
           
 Point toInternalWgs()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WgsPoint

public WgsPoint(double lon,
                double lat)
Method Detail

getLat

public double getLat()
Get coordinate latitude

Returns:
latitude

getLon

public double getLon()
Get coordinate longitude

Returns:
longitude

toInternalWgs

public Point toInternalWgs()

toString

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

equals

public boolean equals(java.lang.Object obj)
Check if two WgsPoint objects refer to the same coordinates.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the other object
Returns:
true if the coordinates are the same, false otherwise
See Also:
Object.equals(java.lang.Object)

hashCode

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

distanceInMeters

public static double distanceInMeters(WgsPoint p1,
                                      WgsPoint p2)
Compute distance in meters between two points.

Parameters:
p1 - first point
p2 - second point
Returns:
distance in meters