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

org.deegree.crs.components
Class Ellipsoid

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

public class Ellipsoid
extends Identifiable
implements java.io.Serializable

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: 19653 $, $Date: 2009-09-15 14:56:30 +0200 (Di, 15 Sep 2009) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $
See Also:
Serialized Form

Field Summary
static Ellipsoid WGS84
          WGS 1984 ellipsoid.
 
Constructor Summary
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, Identifiable id)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, java.lang.String[] identifiers)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, java.lang.String[] identifiers, java.lang.String[] names, java.lang.String[] versions, java.lang.String[] descriptions, java.lang.String[] areasOfUse)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, java.lang.String identifier, java.lang.String name)
           
Ellipsoid(double semiMajorAxis, double eccentricity, Unit units, java.lang.String identifier, java.lang.String name, java.lang.String version, java.lang.String description, java.lang.String areaOfUse)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, Identifiable id)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, java.lang.String[] identifiers)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, java.lang.String[] identifiers, java.lang.String[] names, java.lang.String[] versions, java.lang.String[] descriptions, java.lang.String[] areasOfUse)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, java.lang.String identifier, java.lang.String name)
           
Ellipsoid(double semiMajorAxis, Unit units, double inverseFlattening, java.lang.String identifier, java.lang.String name, java.lang.String version, java.lang.String description, java.lang.String areaOfUse)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, Identifiable id)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, java.lang.String[] identifiers)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, java.lang.String[] identifiers, java.lang.String[] names, java.lang.String[] versions, java.lang.String[] descriptions, java.lang.String[] areasOfUse)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, java.lang.String identifier, java.lang.String name)
           
Ellipsoid(Unit units, double semiMajorAxis, double semiMinorAxis, java.lang.String identifier, java.lang.String name, java.lang.String version, java.lang.String description, java.lang.String areaOfUse)
           
 
Method Summary
 boolean equals(java.lang.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()
           
 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

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,
                 Identifiable id)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
id - containing the relevant information

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 java.lang.String[] identifiers,
                 java.lang.String[] names,
                 java.lang.String[] versions,
                 java.lang.String[] descriptions,
                 java.lang.String[] areasOfUse)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
identifiers -
names -
versions -
descriptions -
areasOfUse -

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 java.lang.String identifier,
                 java.lang.String name,
                 java.lang.String version,
                 java.lang.String description,
                 java.lang.String areaOfUse)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
identifier -
name -
version -
description -
areaOfUse -

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 java.lang.String[] identifiers)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
identifiers -

Ellipsoid

public Ellipsoid(Unit units,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 java.lang.String identifier,
                 java.lang.String name)
Parameters:
units -
semiMajorAxis -
semiMinorAxis -
identifier -
name -

Ellipsoid

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

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 java.lang.String[] identifiers,
                 java.lang.String[] names,
                 java.lang.String[] versions,
                 java.lang.String[] descriptions,
                 java.lang.String[] areasOfUse)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
identifiers -
names -
versions -
descriptions -
areasOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 java.lang.String identifier,
                 java.lang.String name,
                 java.lang.String version,
                 java.lang.String description,
                 java.lang.String areaOfUse)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
identifier -
name -
version -
description -
areaOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 java.lang.String[] identifiers)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
identifiers -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 Unit units,
                 double inverseFlattening,
                 java.lang.String identifier,
                 java.lang.String name)
Parameters:
semiMajorAxis -
units -
inverseFlattening -
identifier -
name -

Ellipsoid

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

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 java.lang.String[] identifiers,
                 java.lang.String[] names,
                 java.lang.String[] versions,
                 java.lang.String[] descriptions,
                 java.lang.String[] areasOfUse)
Parameters:
semiMajorAxis -
eccentricity -
units -
identifiers -
names -
versions -
descriptions -
areasOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 java.lang.String identifier,
                 java.lang.String name,
                 java.lang.String version,
                 java.lang.String description,
                 java.lang.String areaOfUse)
Parameters:
semiMajorAxis -
eccentricity -
units -
identifier -
name -
version -
description -
areaOfUse -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 java.lang.String[] identifiers)
Parameters:
semiMajorAxis -
eccentricity -
units -
identifiers -

Ellipsoid

public Ellipsoid(double semiMajorAxis,
                 double eccentricity,
                 Unit units,
                 java.lang.String identifier,
                 java.lang.String name)
Parameters:
semiMajorAxis -
eccentricity -
units -
identifier -
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.

equals

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

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()

isSphere

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

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