org.eclipse.ohf.stem.ui.ge.kml
Class Coordinates

java.lang.Object
  extended by org.eclipse.ohf.stem.ui.ge.kml.Coordinates

public class Coordinates
extends java.lang.Object

Build a coordinates attribute for a KML document.

    
 


Constructor Summary
Coordinates(double longitude, double latitude)
          Coordinates constructor without altitude.
Coordinates(double longitude, double latitude, double altitude)
          Coordinates constructor with altitude.
 
Method Summary
 double getAltitude()
           
 java.lang.String getCoordinates()
           
 double getLatitude()
           
 double getLongitude()
           
 boolean isAltitudeSpecified()
           
 void setCoordinates(double longitude, double latitude)
          Add coordinates to the Coordinates section
 void setCoordinates(double longitude, double latitude, int alt)
          Add coordinates to the Coordinates section (with altitude)
static java.lang.String toString(Coordinates[] corners)
          return a set of coordinates as a String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Coordinates

public Coordinates(double longitude,
                   double latitude)
Coordinates constructor without altitude. Create a coordinate.

Parameters:
longitude -
latitude -

Coordinates

public Coordinates(double longitude,
                   double latitude,
                   double altitude)
Coordinates constructor with altitude. Create a coordinate.

Parameters:
longitude -
latitude -
altitude -
Method Detail

getCoordinates

public java.lang.String getCoordinates()
Returns:
String with longitude,latitude[,altitude] )

getLongitude

public double getLongitude()
Returns:
longitude

getLatitude

public double getLatitude()
Returns:
latitude

getAltitude

public double getAltitude()
Returns:
altitude

setCoordinates

public void setCoordinates(double longitude,
                           double latitude)
Add coordinates to the Coordinates section

Parameters:
longitude -
latitude -

setCoordinates

public void setCoordinates(double longitude,
                           double latitude,
                           int alt)
Add coordinates to the Coordinates section (with altitude)

Parameters:
longitude -
latitude -
alt -

toString

public static java.lang.String toString(Coordinates[] corners)
return a set of coordinates as a String. This is needed to build a polygon from a list of points. long1,lat1,alt1 long2,lat2,alt2 ...

Parameters:
corners -
Returns:
String value

isAltitudeSpecified

public boolean isAltitudeSpecified()
Returns:
the _isAltitudeSpecified