org.placelab.core
Class ThreeDCoordinate

java.lang.Object
  extended byorg.placelab.core.TwoDCoordinate
      extended byorg.placelab.core.ThreeDCoordinate
All Implemented Interfaces:
Coordinate

public class ThreeDCoordinate
extends TwoDCoordinate


Field Summary
static ThreeDCoordinate NULL
           
 
Constructor Summary
ThreeDCoordinate()
           
ThreeDCoordinate(double lat, double lon, double altitude)
           
ThreeDCoordinate(ThreeDCoordinate c)
           
 
Method Summary
 void constructFromMap(java.util.Hashtable map)
          Constructs from a Hashtable.
 double distanceFrom(ThreeDCoordinate c2)
           
 java.lang.String distanceFromAsString(Coordinate c2)
           
 int distanceFromInMeters(Coordinate c2)
          Returns the distance between points in meters
 double getElevation()
           
 boolean getIsElevationKnown()
           
 boolean isNull()
          The Null coordinate is a Coordinate which does not map to anywhere at all.
 java.lang.String toString()
           
 double zDistanceFrom(ThreeDCoordinate c2)
           
 
Methods inherited from class org.placelab.core.TwoDCoordinate
constructFromNMEA, constructFromStrings, createClone, createCloneAndMove, distanceFrom, equals, getLatitude, getLatitudeAsString, getLatitudeHemisphereNMEA, getLatitudeNMEA, getLongitude, getLongitudeAsString, getLongitudeHemisphereNMEA, getLongitudeNMEA, metersToLatitudeUnits, metersToLongitudeUnits, moveBy, moveTo, setLatitude, setLongitude, translate, within, xDistanceFrom, yDistanceFrom
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final ThreeDCoordinate NULL
Constructor Detail

ThreeDCoordinate

public ThreeDCoordinate()

ThreeDCoordinate

public ThreeDCoordinate(double lat,
                        double lon,
                        double altitude)

ThreeDCoordinate

public ThreeDCoordinate(ThreeDCoordinate c)
Method Detail

constructFromMap

public void constructFromMap(java.util.Hashtable map)
Description copied from interface: Coordinate
Constructs from a Hashtable. The Hashtable should have the following structure:
 Types.LATITUDE=latitude as a String in hh.dddddd format
 Types.LONGITUDE=longitude as a String in hh.ddddd format
 

Specified by:
constructFromMap in interface Coordinate
Overrides:
constructFromMap in class TwoDCoordinate

getElevation

public double getElevation()

getIsElevationKnown

public boolean getIsElevationKnown()

isNull

public boolean isNull()
Description copied from interface: Coordinate
The Null coordinate is a Coordinate which does not map to anywhere at all. Returns true if this coordinate is the Null coordinate.

Specified by:
isNull in interface Coordinate
Overrides:
isNull in class TwoDCoordinate

toString

public java.lang.String toString()
Specified by:
toString in interface Coordinate
Overrides:
toString in class TwoDCoordinate

distanceFromInMeters

public int distanceFromInMeters(Coordinate c2)
Description copied from class: TwoDCoordinate
Returns the distance between points in meters

Specified by:
distanceFromInMeters in interface Coordinate
Overrides:
distanceFromInMeters in class TwoDCoordinate

distanceFromAsString

public java.lang.String distanceFromAsString(Coordinate c2)
Specified by:
distanceFromAsString in interface Coordinate
Overrides:
distanceFromAsString in class TwoDCoordinate

distanceFrom

public double distanceFrom(ThreeDCoordinate c2)

zDistanceFrom

public double zDistanceFrom(ThreeDCoordinate c2)