ucar.unidata.geoloc
Class EarthEllipsoid

java.lang.Object
  extended by ucar.unidata.geoloc.Earth
      extended by ucar.unidata.geoloc.EarthEllipsoid

public final class EarthEllipsoid
extends Earth

Type-safe enumeration of Earth Ellipsoids. Follows EPSG.

Version:
$Revision: 1.5 $ $Date: 2006/11/18 19:03:12 $
Author:
john caron
See Also:
"http://www.epsg.org/"

Field Summary
static EarthEllipsoid WGS84
          _more_
 
Constructor Summary
EarthEllipsoid(java.lang.String name, int epsgId, double a, double f)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          Objects with same name are equal.
static java.util.Collection getAll()
          get a collection of all defined EarthEllipsoid objects
 int getEpsgId()
          EPSG id
 java.lang.String getName()
          EPSG name
static EarthEllipsoid getType(int epsgId)
          Find the EarthEllipsoid that matches this EPSG Id.
static EarthEllipsoid getType(java.lang.String name)
          Find the EarthEllipsoid that matches this name.
 int hashCode()
          Override Object.hashCode() to be consistent with this equals.
 java.lang.String toString()
          Same as EPSG name
 
Methods inherited from class ucar.unidata.geoloc.Earth
getEccentricity, getFlattening, getMajor, getMinor, getRadius
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WGS84

public static final EarthEllipsoid WGS84
_more_

Constructor Detail

EarthEllipsoid

public EarthEllipsoid(java.lang.String name,
                      int epsgId,
                      double a,
                      double f)
Constructor.

Parameters:
name - EPSG name
epsgId - EPSG id
a - semimajor (equatorial) radius, in meters.
f - inverse flattening.
Method Detail

getAll

public static java.util.Collection getAll()
get a collection of all defined EarthEllipsoid objects

Returns:
_more_

getType

public static EarthEllipsoid getType(java.lang.String name)
Find the EarthEllipsoid that matches this name.

Parameters:
name - : name to match
Returns:
EarthEllipsoid or null if no match.

getType

public static EarthEllipsoid getType(int epsgId)
Find the EarthEllipsoid that matches this EPSG Id.

Parameters:
epsgId - : epsg Id to match
Returns:
EarthEllipsoid or null if no match.

getName

public java.lang.String getName()
EPSG name

Returns:
_more_

getEpsgId

public int getEpsgId()
EPSG id

Returns:
_more_

toString

public java.lang.String toString()
Same as EPSG name

Overrides:
toString in class java.lang.Object
Returns:
_more_

hashCode

public int hashCode()
Override Object.hashCode() to be consistent with this equals.

Overrides:
hashCode in class java.lang.Object
Returns:
_more_

equals

public boolean equals(java.lang.Object o)
Objects with same name are equal.

Overrides:
equals in class java.lang.Object
Parameters:
o - _more_
Returns:
_more_