Package ucar.unidata.geoloc
Class EarthEllipsoid
- java.lang.Object
-
- ucar.unidata.geoloc.Earth
-
- ucar.unidata.geoloc.EarthEllipsoid
-
- All Implemented Interfaces:
Serializable
@Immutable public class EarthEllipsoid extends Earth
Type-safe enumeration of Earth Ellipsoids. Follows EPSG.- See Also:
- http://www.epsg.org/, "http://www.epsg.org/", Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static EarthEllipsoidAiry1830Airy 1830 ellipsoid from EPSG database version 6.14.static EarthEllipsoidIAG_GRS80static EarthEllipsoidIAUstatic EarthEllipsoidWGS84Ellipsoid for WGS84 (edavis - correct 1/f as per EPSG database ver 6.14)-
Fields inherited from class ucar.unidata.geoloc.Earth
DEFAULT, eccentricity, eccentricitySquared, equatorRadius, flattening, name, poleRadius, WGS84_EARTH_RADIUS_KM, WGS84_EARTH_RADIUS_METERS
-
-
Constructor Summary
Constructors Constructor Description EarthEllipsoid(String name, int epsgId, double a, double b, double invF)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Objects with same name are equal.static Collection<EarthEllipsoid>getAll()get a collection of all defined EarthEllipsoid objectsintgetEpsgId()EPSG idStringgetName()EPSG namestatic EarthEllipsoidgetType(int epsgId)Find the EarthEllipsoid that matches this EPSG Id.static EarthEllipsoidgetType(String name)Find the EarthEllipsoid that matches this name.inthashCode()Override Object.hashCode() to be consistent with this equals.StringtoString()Same as EPSG name-
Methods inherited from class ucar.unidata.geoloc.Earth
getEccentricity, getEccentricitySquared, getEquatorRadius, getFlattening, getMajor, getMinor, getPoleRadius, getRadius, isSpherical
-
-
-
-
Field Detail
-
WGS84
public static final EarthEllipsoid WGS84
Ellipsoid for WGS84 (edavis - correct 1/f as per EPSG database ver 6.14)
-
Airy1830
public static final EarthEllipsoid Airy1830
Airy 1830 ellipsoid from EPSG database version 6.14.
-
IAU
public static final EarthEllipsoid IAU
-
IAG_GRS80
public static final EarthEllipsoid IAG_GRS80
-
-
Constructor Detail
-
EarthEllipsoid
public EarthEllipsoid(String name, int epsgId, double a, double b, double invF)
Constructor.- Parameters:
name- EPSG nameepsgId- EPSG ida- semimajor (equatorial) radius, in meters.b- semiminor (polar) radius, in meters.invF- inverse flattening.
-
-
Method Detail
-
getAll
public static Collection<EarthEllipsoid> getAll()
get a collection of all defined EarthEllipsoid objects- Returns:
- all defined EarthEllipsoid objects
-
getType
public static EarthEllipsoid getType(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.
-
getEpsgId
public int getEpsgId()
EPSG id- Returns:
- the EPSG id
-
toString
public String toString()
Same as EPSG name
-
hashCode
public int hashCode()
Override Object.hashCode() to be consistent with this equals.
-
-