org.deegree.crs.components
Class Ellipsoid
java.lang.Object
org.deegree.crs.CRSIdentifiable
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 $
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)
|
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 |
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,
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
-
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:
- 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()
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]]>