org.deegree_impl.model.cs
Class PrimeMeridian

java.lang.Object
  extended byorg.deegree_impl.model.cs.Info
      extended byorg.deegree_impl.model.cs.PrimeMeridian
All Implemented Interfaces:
java.io.Serializable

public class PrimeMeridian
extends Info

A meridian used to take longitude measurements from.

Version:
1.00
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux
See Also:
CS_PrimeMeridian, Serialized Form

Nested Class Summary
private  class PrimeMeridian.Export
          Wrap a PrimeMeridian object for use with OpenGIS.
 
Nested classes inherited from class org.deegree_impl.model.cs.Info
Info.AngularUnit, Info.LinearUnit
 
Field Summary
static PrimeMeridian GREENWICH
          The Greenwich meridian, with angular measures in degrees.
private  double longitude
          The longitude value relative to the Greenwich Meridian.
private static long serialVersionUID
          Serial number for interoperability with different versions.
private  Unit unit
          The angular units.
 
Fields inherited from class org.deegree_impl.model.cs.Info
pool
 
Constructor Summary
(package private) PrimeMeridian(java.util.Map properties, Unit unit, double longitude)
          Creates a prime meridian, relative to Greenwich.
  PrimeMeridian(java.lang.String name, Unit unit, double longitude)
          Creates a prime meridian, relative to Greenwich.
 
Method Summary
(package private)  java.lang.String addString(java.lang.StringBuffer buffer)
          Fill the part inside "[...]".
 boolean equals(java.lang.Object object)
          Compares the specified object with this prime meridian for equality.
 Unit getAngularUnit()
          Returns the angular units.
 double getLongitude()
          Returns the longitude value relative to the Greenwich Meridian.
 double getLongitude(Unit targetUnit)
          Returns the longitude value relative to the Greenwich Meridian, expressed in the specified units.
 int hashCode()
          Returns a hash value for this prime meridian.
(package private)  java.lang.Object toOpenGIS(java.lang.Object adapters)
          Returns an OpenGIS interface for this prime meridian.
 
Methods inherited from class org.deegree_impl.model.cs.Info
addUnit, cachedOpenGIS, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, getAbbreviation, getAlias, getAuthority, getAuthorityCode, getName, getRemarks, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial number for interoperability with different versions.

See Also:
Constant Field Values

GREENWICH

public static final PrimeMeridian GREENWICH
The Greenwich meridian, with angular measures in degrees.


unit

private final Unit unit
The angular units.


longitude

private final double longitude
The longitude value relative to the Greenwich Meridian.

Constructor Detail

PrimeMeridian

public PrimeMeridian(java.lang.String name,
                     Unit unit,
                     double longitude)
Creates a prime meridian, relative to Greenwich.

Parameters:
name - Name to give new object.
unit - Angular units of longitude.
longitude - Longitude of prime meridian in supplied angular units East of Greenwich.

PrimeMeridian

PrimeMeridian(java.util.Map properties,
              Unit unit,
              double longitude)
Creates a prime meridian, relative to Greenwich.

Parameters:
properties - The set of properties (see Info).
unit - Angular units of longitude.
longitude - Longitude of prime meridian in supplied angular units East of Greenwich.
Method Detail

getLongitude

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

See Also:
CS_PrimeMeridian.getLongitude()

getLongitude

public double getLongitude(Unit targetUnit)
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 units of this prime meridian.

Parameters:
targetUnit - The unit in which to express longitude.

getAngularUnit

public Unit getAngularUnit()
Returns the angular units.

See Also:
CS_PrimeMeridian.getAngularUnit()

hashCode

public int hashCode()
Returns a hash value for this prime meridian.

Overrides:
hashCode in class Info

equals

public boolean equals(java.lang.Object object)
Compares the specified object with this prime meridian for equality.

Overrides:
equals in class Info

addString

java.lang.String addString(java.lang.StringBuffer buffer)
Fill the part inside "[...]". Used for formatting Well Know Text (WKT).

Overrides:
addString in class Info
Parameters:
buffer - The buffer to add string to.
Returns:
The WKT code name (e.g. "GEOGCS").

toOpenGIS

final java.lang.Object toOpenGIS(java.lang.Object adapters)
Returns an OpenGIS interface for this prime meridian. The returned object is suitable for RMI use. Note: The returned type is a generic Object in order to avoid too early class loading of OpenGIS interface.

Overrides:
toOpenGIS in class Info