deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.crs.components
Class PrimeMeridian

java.lang.Object
  extended by org.deegree.crs.Identifiable
      extended by org.deegree.crs.components.PrimeMeridian
All Implemented Interfaces:
java.io.Serializable

public class PrimeMeridian
extends Identifiable
implements java.io.Serializable

The PrimeMeridian class saves the longitude to the greenwich meridian.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $
See Also:
Serialized Form

Field Summary
static PrimeMeridian GREENWICH
          The PrimeMeridian of greenwich with epsg:8901 code and radian units.
 
Constructor Summary
PrimeMeridian(Unit units, double longitude, Identifiable id)
           
PrimeMeridian(Unit units, double longitude, java.lang.String identifier)
           
PrimeMeridian(Unit units, double longitude, java.lang.String[] identifiers)
           
PrimeMeridian(Unit units, double longitude, java.lang.String[] identifiers, java.lang.String[] names, java.lang.String[] versions, java.lang.String[] descriptions, java.lang.String[] areasOfUse)
           
PrimeMeridian(Unit units, double longitude, java.lang.String identifier, java.lang.String name, java.lang.String version, java.lang.String description, java.lang.String areaOfUse)
           
PrimeMeridian(Unit units, java.lang.String[] identifiers)
          A Prime meredian with 0 degrees longitude from the greenwich meridian.
PrimeMeridian(Unit units, java.lang.String identifier, java.lang.String name)
          A Prime meredian with 0 degrees longitude from the greenwich meridian.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 Unit getAngularUnit()
           
 double getLongitude()
           
 double getLongitude(Unit targetUnit)
           
 double getLongitudeAsRadian()
           
 int hashCode()
          Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast.
 java.lang.String toString()
           
 
Methods inherited from class org.deegree.crs.Identifiable
checkForNullObject, checkForNullObject, checkForNullObject, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getDescription, getDescriptions, getIdAndName, getIdentifier, getIdentifiers, getName, getNames, getVersion, getVersions, hasID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GREENWICH

public static final PrimeMeridian GREENWICH
The PrimeMeridian of greenwich with epsg:8901 code and radian units.

Constructor Detail

PrimeMeridian

public PrimeMeridian(Unit units,
                     double longitude,
                     Identifiable id)
Parameters:
units - Angular units of longitude, normally radians.
longitude - (in given units) normally radians.
id - to be cloned

PrimeMeridian

public PrimeMeridian(Unit units,
                     double longitude,
                     java.lang.String[] identifiers,
                     java.lang.String[] names,
                     java.lang.String[] versions,
                     java.lang.String[] descriptions,
                     java.lang.String[] areasOfUse)
Parameters:
units - Angular units of longitude, normally radians.
longitude - (in given units) normally radians.
identifiers -
names -
versions -
descriptions -
areasOfUse -

PrimeMeridian

public PrimeMeridian(Unit units,
                     double longitude,
                     java.lang.String identifier,
                     java.lang.String name,
                     java.lang.String version,
                     java.lang.String description,
                     java.lang.String areaOfUse)
Parameters:
units - Angular units of longitude.
longitude -
identifier -
name -
version -
description -
areaOfUse -

PrimeMeridian

public PrimeMeridian(Unit units,
                     double longitude,
                     java.lang.String[] identifiers)
Parameters:
units - Angular units of longitude.
longitude -
identifiers -

PrimeMeridian

public PrimeMeridian(Unit units,
                     double longitude,
                     java.lang.String identifier)
Parameters:
units - Angular units of longitude.
longitude -
identifier -

PrimeMeridian

public PrimeMeridian(Unit units,
                     java.lang.String[] identifiers)
A Prime meredian with 0 degrees longitude from the greenwich meridian.

Parameters:
units - Angular units of longitude.
identifiers -

PrimeMeridian

public PrimeMeridian(Unit units,
                     java.lang.String identifier,
                     java.lang.String name)
A Prime meredian with 0 degrees longitude from the greenwich meridian.

Parameters:
units - Angular units of longitude.
identifier -
name - human readable name
Method Detail

getLongitude

public double getLongitude()
Returns:
the longitude value relative to the Greenwich Meridian. The longitude is expressed in this objects angular units.

getLongitude

public double getLongitude(Unit targetUnit)
Parameters:
targetUnit - The unit in which to express longitude.
Returns:
the longitude value relative to the Greenwich Meridian, expressed in the specified units. This convenience method make easier to obtains longitude in degrees (getLongitude(Unit.DEGREE)), no matter the underlying angular unit of this prime meridian.

getLongitudeAsRadian

public double getLongitudeAsRadian()
Returns:
the longitude value relative to the Greenwich Meridian, expressed in the radians.

getAngularUnit

public Unit getAngularUnit()
Returns:
the angular unit.

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class Identifiable

toString

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

hashCode

public int hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. It is created from field f as follows:

Combining the hash code(s) computed above: result = 37 * result + code;

Overrides:
hashCode in class java.lang.Object
Returns:
(int) ( result >>> 32 ) ^ (int) result;
See Also:
Object.hashCode()

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org