org.deegree.crs.components
Class Ellipsoid
java.lang.Object
org.deegree.crs.Identifiable
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
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)
|
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 |
WGS84
public static final Ellipsoid WGS84
- WGS 1984 ellipsoid. This ellipsoid is used in the GPS system and is the "default" Ellipsoid.
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
-
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:
- 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 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.
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org