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:
  • Field Details

    • 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 Details

    • EarthEllipsoid

      public EarthEllipsoid(String name, int epsgId, double a, double b, double invF)
      Constructor.
      Parameters:
      name - EPSG name
      epsgId - EPSG id
      a - semimajor (equatorial) radius, in meters.
      b - semiminor (polar) radius, in meters.
      invF - inverse flattening.
  • Method Details

    • 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.
    • getName

      public String getName()
      EPSG name
      Overrides:
      getName in class Earth
      Returns:
      the EPSG name
    • getEpsgId

      public int getEpsgId()
      EPSG id
      Returns:
      the EPSG id
    • toString

      public String toString()
      Same as EPSG name
      Overrides:
      toString in class Earth
      Returns:
      the EPSG name
    • hashCode

      public int hashCode()
      Override Object.hashCode() to be consistent with this equals.
      Overrides:
      hashCode in class Earth
      Returns:
      hashCode
    • equals

      public boolean equals(Object o)
      Objects with same name are equal.
      Overrides:
      equals in class Earth
      Parameters:
      o - test this for equals
      Returns:
      +,0,-