Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.crs.components
Class PrimeMeridian

    java.lang.Object
      org.deegree.crs.Identifiable
          org.deegree.crs.components.PrimeMeridian

All Implemented Interfaces:
  Serializable

    public class PrimeMeridian

extends Identifiable
implements 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, String identifier)`
`PrimeMeridian(Unit units, double longitude, String[] identifiers)`
`PrimeMeridian(Unit units, double longitude, String[] identifiers, String[] names, String[] versions, String[] descriptions, String[] areasOfUse)`
`PrimeMeridian(Unit units, double longitude, String identifier, String name, String version, String description, String areaOfUse)`
`PrimeMeridian(Unit units, String[] identifiers)` A Prime meredian with 0 degrees longitude from the greenwich meridian.
`PrimeMeridian(Unit units, String identifier, String name)` A Prime meredian with 0 degrees longitude from the greenwich meridian.

Method Summary
`boolean` | `equals(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.
`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,
                         String[] identifiers,
                         String[] names,
                         String[] versions,
                         String[] descriptions,
                         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,
                         String identifier,
                         String name,
                         String version,
                         String description,
                         String areaOfUse)

Parameters:
  `units` - Angular units of longitude.
  `longitude` -
  `identifier` -
  `name` -
  `version` -
  `description` -
  `areaOfUse` -

### PrimeMeridian

    public PrimeMeridian(Unit units,
                         double longitude,
                         String[] identifiers)

Parameters:
  `units` - Angular units of longitude.
  `longitude` -
  `identifiers` -

### PrimeMeridian

    public PrimeMeridian(Unit units,
                         double longitude,
                         String identifier)

Parameters:
  `units` - Angular units of longitude.
  `longitude` -
  `identifier` -

### PrimeMeridian

    public PrimeMeridian(Unit units,
                         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,
                         String identifier,
                         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(Object other)

  Overrides:
    `equals` in class `Identifiable`

### toString

    public 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:
  - boolean -- code = (f ? 0 : 1)
  - byte, char, short, int -- code = (int)f
  - long -- code = (int)(f ^ (f >>>32))
  - float -- code = Float.floatToIntBits(f);
  - double -- long l = Double.doubleToLongBits(f); code = (int)(l ^ (l >>> 32))
  - all Objects, (where equals( ) calls equals( ) for this field) -- code = f.hashCode( )
  - Array -- Apply above rules to each element

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

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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