de.fhg.igd.earth.utils
Class GeoPosition

java.lang.Object
  extended byde.fhg.igd.earth.utils.GeoPosition

public class GeoPosition
extends Object

This class represents a geographical position. It is defined by two values: longitude and latitude. (DEG) The position can converted into a String. example: "E036°15,5´ N50°08,2´" Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel

Field Summary
private  double latitude_
          latitude (deg)
private  double longitude_
          longitude (deg)
 
Constructor Summary
GeoPosition()
          Creates an instance of this class (Lo=0,La=0).
GeoPosition(double longitude, double latitude)
          Creates an instance of this class with the given values.
 
Method Summary
 double getLatitude()
          Returns the latitude (deg)
 double getLongitude()
          Returns the longitude (deg)
 String getString()
          Converts the geoposition into a string ("E036°15,5´ N50°08,2´")
static String getString(double longitude, double latitude, boolean degree)
          Converts the given geoposition into a string ("E036°15,5´ N50°08,2´")
 void set(double longitude, double latitude)
          Sets the geoposition with the given values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

longitude_

private double longitude_
longitude (deg)


latitude_

private double latitude_
latitude (deg)

Constructor Detail

GeoPosition

public GeoPosition()
Creates an instance of this class (Lo=0,La=0).


GeoPosition

public GeoPosition(double longitude,
                   double latitude)
Creates an instance of this class with the given values.

Parameters:
longitude - Longitude (deg)
latitude - Latitude (deg)
Method Detail

getLongitude

public double getLongitude()
Returns the longitude (deg)

Returns:
longitude

getLatitude

public double getLatitude()
Returns the latitude (deg)

Returns:
latitude

set

public void set(double longitude,
                double latitude)
Sets the geoposition with the given values.

Parameters:
longitude - Longitude (deg)
latitude - Latitude (deg)

getString

public String getString()
Converts the geoposition into a string ("E036°15,5´ N50°08,2´")

Returns:
geoposition string

getString

public static String getString(double longitude,
                               double latitude,
                               boolean degree)
Converts the given geoposition into a string ("E036°15,5´ N50°08,2´")

Parameters:
longitude - Longitude
latitude - Latitude
Returns:
geoposition string


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.