Jeospace API

org.jeospace.geometry
Class Ellipsoid

java.lang.Object
  extended byorg.jeospace.geometry.Ellipsoid

public class Ellipsoid
extends java.lang.Object

Ellipsoid is an immutable object that represents a geometric shape also known as an oblate spheroid or an ellipsoid of revolution.

For further reference see:
http://mathworld.wolfram.com/OblateSpheroid.html

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton

Constructor Summary
Ellipsoid()
          Construct a default Ellipsoid object, a sphere of radius 1 km.
Ellipsoid(Length semiMajorAxis, double inverseFlattening, java.lang.String id)
          Construct an Ellipsoid object.
Ellipsoid(Length semiMajorAxis, Length semiMinorAxis, java.lang.String id)
          Construct an Ellipsoid object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare two Ellipsoids for equality.
 double getEllipticity()
          Return the double value of the ellipsoid ellipticity parameter.
 double getEllipticitySquared()
          Return the double value of the ellipsoid ellipticity^2 parameter.
 Length getEquatorialRadius()
          Return the Length of the equatorial radius of the ellipsoid.
 double getFlattening()
          Return the double value of the ellipsoid flattening parameter.
 java.lang.String getID()
          Return the id string of this ellipsoid
 Length getPolarRadius()
          Return the Length of the polar radius of the ellipsoid.
 Length getRadius(Latitude latitude)
          Return a Length object representing the ellipsoidal radius at the argument Latitude.
 int hashCode()
          Calculate the hashcode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ellipsoid

public Ellipsoid()
Construct a default Ellipsoid object, a sphere of radius 1 km.


Ellipsoid

public Ellipsoid(Length semiMajorAxis,
                 Length semiMinorAxis,
                 java.lang.String id)
Construct an Ellipsoid object.

Parameters:
semiMajorAxis - the equatorial ( Semi-Major Axis ) radius.
semiMinorAxis - the polar ( Semi-Minor Axis ) radius.
id - the id string

Ellipsoid

public Ellipsoid(Length semiMajorAxis,
                 double inverseFlattening,
                 java.lang.String id)
Construct an Ellipsoid object.

Parameters:
semiMajorAxis - the equatorial ( Semi-Major Axis ) radius.
inverseFlattening - the inverse flattening of the ellipsoid.
id - the id string
Method Detail

getEquatorialRadius

public Length getEquatorialRadius()
Return the Length of the equatorial radius of the ellipsoid.

Returns:
the Length of the equatorial radius of the ellipsoid.

getPolarRadius

public Length getPolarRadius()
Return the Length of the polar radius of the ellipsoid.

Returns:
the Length of the polar radius of the ellipsoid.

getRadius

public Length getRadius(Latitude latitude)
Return a Length object representing the ellipsoidal radius at the argument Latitude.

Parameters:
latitude - the ellipsoidal coordinate Latitude.
Returns:
the ellipsoidal radius in a Length object.

getFlattening

public double getFlattening()
Return the double value of the ellipsoid flattening parameter.

Returns:
the double value of the ellipsoid flattening parameter.

getEllipticity

public double getEllipticity()
Return the double value of the ellipsoid ellipticity parameter.

Returns:
the double value of the ellipsoid ellipticity parameter.

getEllipticitySquared

public double getEllipticitySquared()
Return the double value of the ellipsoid ellipticity^2 parameter.

Returns:
the double value of the ellipsoid ellipticity^2 parameter.

getID

public java.lang.String getID()
Return the id string of this ellipsoid

Returns:
the id string of this ellipsoid

hashCode

public int hashCode()
Calculate the hashcode

Returns:
the hashcode

equals

public boolean equals(java.lang.Object obj)
Compare two Ellipsoids for equality. The result is true if and only if the argument object is not null, is an Ellipsoid object and represents a ellipsoid with identical parameters to this Ellipsoid.

Two Ellipsoid objects are equal only if the Length objects representing the ellipsoid's radii are equal.

Parameters:
obj - the object to compare with
Returns:
true if the Ellipsoids are equal; false otherwise.

Jeospace API

Copyright © 2006 - jeospace.org