deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.cs
Class Ellipsoid

java.lang.Object
  extended by org.deegree.model.csct.cs.Info
      extended by org.deegree.model.csct.cs.Ellipsoid
All Implemented Interfaces:
Serializable

public class Ellipsoid
extends Info

The figure formed by the rotation of an ellipse about an axis. In this context, the axis of rotation is always the minor axis. It is named geodetic ellipsoid if the parameters are derived by the measurement of the shape and the size of the Earth to approximate the geoid as close as possible.

Version:
1.00, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux, last edited by: $Author: bezema $
See Also:
"org.opengis.cs.CS_Ellipsoid", Serialized Form

Field Summary
static Ellipsoid WGS84
          WGS 1984 ellipsoid.
 
Fields inherited from class org.deegree.model.csct.cs.Info
pool
 
Constructor Summary
Ellipsoid(Map properties, double semiMajorAxis, double semiMinorAxis, double inverseFlattening, boolean ivfDefinitive, Unit unit)
          Construct a new ellipsoid using the specified axis length.
Ellipsoid(String name, double semiMajorAxis, double semiMinorAxis, Unit unit)
          Construct a new ellipsoid using the specified axis length.
Ellipsoid(String name, double radius, Unit unit)
          Construct a new sphere using the specified radius.
 
Method Summary
(package private)  String addString(StringBuffer buffer)
          Fill the part inside "[...]".
static Ellipsoid createFlattenedSphere(String name, double semiMajorAxis, double inverseFlattening, Unit unit)
          Construct a new ellipsoid using the specified axis length and inverse flattening value.
 boolean equals(Object object)
          Compares the specified object with this ellipsoid for equality.
 Unit getAxisUnit()
          Returns the units of the semi-major and semi-minor axis values.
 double getEccentricity()
          The ratio of the distance between the center and a focus of the ellipse to the length of its semimajor axis.
 double getInverseFlattening()
          Returns the value of the inverse of the flattening constant.
 double getSemiMajorAxis()
          Gets the equatorial radius.
 double getSemiMinorAxis()
          Gets the polar radius.
 int hashCode()
          Returns a hash value for this ellipsoid.
 boolean isIvfDefinitive()
          Is the Inverse Flattening definitive for this ellipsoid?
 double orthodromicDistance(double x1, double y1, double x2, double y2)
          Returns an estimation of orthodromic distance between two geographic coordinates.
 double orthodromicDistance(Point2D P1, Point2D P2)
          Returns an estimation of orthodromic distance between two geographic coordinates.
 
Methods inherited from class org.deegree.model.csct.cs.Info
addString, addUnit, 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

WGS84

public static final Ellipsoid WGS84
WGS 1984 ellipsoid. This ellipsoid is used in GPS system and is the default for most org.deegree.model packages.

Constructor Detail

Ellipsoid

public Ellipsoid(String name,
                 double radius,
                 Unit unit)
Construct a new sphere using the specified radius.

Parameters:
name - Name of this sphere.
radius - The equatorial and polar radius.
unit - The units of the semi-major and semi-minor axis values.

Ellipsoid

public Ellipsoid(String name,
                 double semiMajorAxis,
                 double semiMinorAxis,
                 Unit unit)
Construct a new ellipsoid using the specified axis length.

Parameters:
name - Name of this ellipsoid.
semiMajorAxis - The equatorial radius.
semiMinorAxis - The polar radius.
unit - The units of the semi-major and semi-minor axis values.

Ellipsoid

Ellipsoid(Map properties,
          double semiMajorAxis,
          double semiMinorAxis,
          double inverseFlattening,
          boolean ivfDefinitive,
          Unit unit)
Construct a new ellipsoid using the specified axis length.

Parameters:
properties - The set of properties (see Info).
semiMajorAxis - The equatorial radius.
semiMinorAxis - The polar radius.
inverseFlattening - The inverse of the flattening value.
ivfDefinitive - Is the Inverse Flattening definitive for this ellipsoid?
unit - The units of the semi-major and semi-minor axis values.
Method Detail

createFlattenedSphere

public static Ellipsoid createFlattenedSphere(String name,
                                              double semiMajorAxis,
                                              double inverseFlattening,
                                              Unit unit)
Construct a new ellipsoid using the specified axis length and inverse flattening value.

Parameters:
name - Name of this ellipsoid.
semiMajorAxis - The equatorial radius.
inverseFlattening - The inverse flattening value.
unit - The units of the semi-major and semi-minor axis values.
Returns:

getSemiMajorAxis

public double getSemiMajorAxis()
Gets the equatorial radius. The returned length is expressed in this object's axis units.

Returns:
the equatorial radius. The returned length is expressed in this object's axis units.
See Also:
"org.opengis.cs.CS_Ellipsoid#getSemiMajorAxis()"

getSemiMinorAxis

public double getSemiMinorAxis()
Gets the polar radius. The returned length is expressed in this object's axis units.

Returns:
the polar radius. The returned length is expressed in this object's axis units.
See Also:
"org.opengis.cs.CS_Ellipsoid#getSemiMinorAxis()"

getEccentricity

public double getEccentricity()
The ratio of the distance between the center and a focus of the ellipse to the length of its semimajor axis. The eccentricity can alternately be computed from the equation: e=sqrt(2f-f�).

Returns:

getInverseFlattening

public double getInverseFlattening()
Returns the value of the inverse of the flattening constant. Flattening is a value used to indicate how closely an ellipsoid approaches a spherical shape. The inverse flattening is related to the equatorial/polar radius (re and rp respectively) by the formula ivf=re/(re-rp). For perfect spheres, this method returns Double.POSITIVE_INFINITY (which is the correct value).

Returns:
the value of the inverse of the flattening constant.
See Also:
"org.opengis.cs.CS_Ellipsoid#getInverseFlattening()"

isIvfDefinitive

public boolean isIvfDefinitive()
Is the Inverse Flattening definitive for this ellipsoid? Some ellipsoids use the IVF as the defining value, and calculate the polar radius whenever asked. Other ellipsoids use the polar radius to calculate the IVF whenever asked. This distinction can be important to avoid floating-point rounding errors.

Returns:

orthodromicDistance

public double orthodromicDistance(Point2D P1,
                                  Point2D P2)
Returns an estimation of orthodromic distance between two geographic coordinates. The orthodromic distance is the shortest distance between two points on a sphere's surface. The orthodromic path is always on a great circle. An other possible distance measurement is the loxodromic distance, which is a longer distance on a path with a constant direction on the compas.

Parameters:
P1 - Longitude and latitude of first point (in degrees).
P2 - Longitude and latitude of second point (in degrees).
Returns:
The orthodromic distance (in the units of this ellipsoid).

orthodromicDistance

public double orthodromicDistance(double x1,
                                  double y1,
                                  double x2,
                                  double y2)
Returns an estimation of orthodromic distance between two geographic coordinates. The orthodromic distance is the shortest distance between two points on a sphere's surface. The orthodromic path is always on a great circle. An other possible distance measurement is the loxodromic distance, which is a longer distance on a path with a constant direction on the compas.

Parameters:
x1 - Longitude of first point (in degrees).
y1 - Latitude of first point (in degrees).
x2 - Longitude of second point (in degrees).
y2 - Latitude of second point (in degrees).
Returns:
The orthodromic distance (in the units of this ellipsoid).

getAxisUnit

public Unit getAxisUnit()
Returns the units of the semi-major and semi-minor axis values.

Returns:
he units of the semi-major and semi-minor axis values.
See Also:
"org.opengis.cs.CS_Ellipsoid#getAxisUnit()"

equals

public boolean equals(Object object)
Compares the specified object with this ellipsoid for equality.

Overrides:
equals in class Info
Parameters:
object -
Returns:

hashCode

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

Overrides:
hashCode in class Info
Returns:
a hash value for this ellipsoid.

addString

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

Parameters:
buffer -
Returns:

deegree 2.1 (2007/11/08 09:57 build-328-official)

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