deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.crs.components
Class Ellipsoid

java.lang.Object
  extended by org.deegree.crs.CRSIdentifiable
      extended by org.deegree.crs.components.Ellipsoid

public class Ellipsoid
extends CRSIdentifiable

The Ellipsoid class hold all parameters which are necessary to define an Ellipsoid. Every Ellipsoid has a semi-major-axis and one of inverse_flattening, eccentricity or semi-minor-axis.

Version:
$Revision: 19654 $, $Date: 2009-09-15 15:05:01 +0200 (Di, 15 Sep 2009) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Field Summary
static Ellipsoid WGS84
          WGS 1984 ellipsoid.
 
Constructor Summary
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, CRSCodeType[] codes)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, CRSCodeType[] codes, String[] names, String[] versions, String[] descriptions, String[] areasOfUse)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, CRSCodeType code, String name)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, CRSCodeType code, String name, String version, String description, String areaOfUse)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, CRSIdentifiable id)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, CRSCodeType[] codes)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, CRSCodeType[] codes, String[] names, String[] versions, String[] descriptions, String[] areasOfUse)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, CRSCodeType code, String name)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, CRSCodeType code, String name, String version, String description, String areaOfUse)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, CRSIdentifiable id)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, CRSCodeType[] codes)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, CRSCodeType[] codes, String[] names, String[] versions, String[] descriptions, String[] areasOfUse)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, CRSCodeType code, String name)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, CRSCodeType code, String name, String version, String description, String areaOfUse)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, CRSIdentifiable id)
           
 
Method Summary
 boolean equals(Object other)
           
 double getEccentricity()
           
 double getFlattening()
           
 double getInverseFlattening()
           
 double getSemiMajorAxis()
           
 double getSemiMinorAxis()
           
 double getSquaredEccentricity()
           
 Unit getUnits()
           
 int hashCode()
          Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast.
 boolean isSphere()
           
 void setUnits(Unit units)
           
 String toString()
           
 
Methods inherited from class org.deegree.crs.CRSIdentifiable
addAreaOfUse, addName, checkForNullObject, checkForNullObject, checkForNullObject, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WGS84

public static final Ellipsoid WGS84
WGS 1984 ellipsoid. This ellipsoid is used in the GPS system and is the "default" Ellipsoid.

Constructor Detail

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 CRSIdentifiable id)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
id - containing the relevant information

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 CRSCodeType[] codes,
                 String[] names,
                 String[] versions,
                 String[] descriptions,
                 String[] areasOfUse)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
codes -
names -
versions -
descriptions -
areasOfUse -

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 CRSCodeType code,
                 String name,
                 String version,
                 String description,
                 String areaOfUse)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
code -
name -
version -
description -
areaOfUse -

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 CRSCodeType[] codes)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
codes -

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 CRSCodeType code,
                 String name)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
code -
name -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 CRSIdentifiable id)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
id - containing all id relevant data.

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 CRSCodeType[] codes,
                 String[] names,
                 String[] versions,
                 String[] descriptions,
                 String[] areasOfUse)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
codes -
names -
versions -
descriptions -
areasOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 CRSCodeType code,
                 String name,
                 String version,
                 String description,
                 String areaOfUse)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
code -
name -
version -
description -
areaOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 CRSCodeType[] codes)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
codes -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 CRSCodeType code,
                 String name)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
code -
name -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 CRSIdentifiable id)
Parameters:
semiMajorAxis -
eccentricity -
units -
id - containing all id relevant data.

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 CRSCodeType[] codes,
                 String[] names,
                 String[] versions,
                 String[] descriptions,
                 String[] areasOfUse)
Parameters:
semiMajorAxis -
eccentricity -
units -
codes -
names -
versions -
descriptions -
areasOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 CRSCodeType code,
                 String name,
                 String version,
                 String description,
                 String areaOfUse)
Parameters:
semiMajorAxis -
eccentricity -
units -
code -
name -
version -
description -
areaOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 CRSCodeType[] codes)
Parameters:
semiMajorAxis -
eccentricity -
units -
codes -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 CRSCodeType code,
                 String name)
Parameters:
semiMajorAxis -
eccentricity -
units -
code -
name -
Method Detail

getEccentricity

public final double getEccentricity()
Returns:
the eccentricity.

getSquaredEccentricity

public final double getSquaredEccentricity()
Returns:
the squared eccentricity of the ellipsoid-

getFlattening

public final double getFlattening()
Returns:
the flattening.

getInverseFlattening

public final double getInverseFlattening()
Returns:
the inverseFlattening.

getSemiMajorAxis

public final double getSemiMajorAxis()
Returns:
the semiMajorAxis.

getSemiMinorAxis

public final double getSemiMinorAxis()
Returns:
the semiMinorAxis.

getUnits

public final Unit getUnits()
Returns:
the units.

setUnits

public final void setUnits(Unit units)
Parameters:
units -

equals

public boolean equals(Object other)
Overrides:
equals in class CRSIdentifiable
Parameters:
other - another ellipsoid
Returns:
true if the other ellipsoid != null and its units, semi-major-axis and eccentricity are the same.

toString

public String toString()
Overrides:
toString in class CRSIdentifiable

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 Object
Returns:
(int) ( result >>> 32 ) ^ (int) result;
See Also:
Object.hashCode()

isSphere

public boolean isSphere()
Returns:
true if this ellipsoid has no eccentricity.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

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

]]>