Class Earth

java.lang.Object
ucar.unidata.geoloc.Earth
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EarthEllipsoid

@Immutable public class Earth extends Object implements Serializable
Defines the shape of the earth ellipsoid. LOOK will not implement Serializable in ver6
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Earth
     
    static final double
    Get canonical radius of the spherical earth in km from "WGS 84"
    static final double
    Get canonical radius of the spherical earth in meters from "WGS 84"
  • Constructor Summary

    Constructors
    Constructor
    Description
    Spherical earth with canonical radius.
    Earth(double radius)
    Create a spherical earth.
    Earth(double equatorRadius, double poleRadius, double reciprocalFlattening)
    Create an ellipsoidal earth.
    Earth(double equatorRadius, double poleRadius, double reciprocalFlattening, String name)
    Create an ellipsoidal earth with a name.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    double
    Get the Eccentricity property.
    double
    Get the EccentricitySquared property.
    double
    Get the EquatorRadius property.
    double
    Get the Flattening property.
    double
    Get the equatorial radius (semimajor axis) of the earth, in meters.
    double
    Get the polar radius (semiminor axis) of the earth, in meters.
    Get the Name property.
    double
    Get the PoleRadius property.
    static double
    Deprecated.
    use WGS84_EARTH_RADIUS_METERS
    int
     
    boolean
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final Earth DEFAULT
    • WGS84_EARTH_RADIUS_METERS

      public static final double WGS84_EARTH_RADIUS_METERS
      Get canonical radius of the spherical earth in meters from "WGS 84"
      See Also:
    • WGS84_EARTH_RADIUS_KM

      public static final double WGS84_EARTH_RADIUS_KM
      Get canonical radius of the spherical earth in km from "WGS 84"
      See Also:
  • Constructor Details

    • Earth

      public Earth()
      Spherical earth with canonical radius.
    • Earth

      public Earth(double radius)
      Create a spherical earth.
      Parameters:
      radius - radius of spherical earth.
    • Earth

      public Earth(double equatorRadius, double poleRadius, double reciprocalFlattening)
      Create an ellipsoidal earth. The reciprocalFlattening is used if not zero, else the poleRadius is used.
      Parameters:
      equatorRadius - equatorial radius (semimajor axis) in meters, must be specified
      poleRadius - polar radius (semiminor axis) in meters
      reciprocalFlattening - inverse flattening = 1/flattening = a / (a-b)
    • Earth

      public Earth(double equatorRadius, double poleRadius, double reciprocalFlattening, String name)
      Create an ellipsoidal earth with a name.
      Parameters:
      equatorRadius - equatorial radius (semimajor axis) in meters, must be specified
      poleRadius - polar radius (semiminor axis) in meters; if reciprocalFlattening != 0 then this is ignored
      reciprocalFlattening - inverse flattening = 1/flattening = a / (a-b); if 0 use the poleRadius to calculate
      name - name of the Earth
  • Method Details

    • getRadius

      @Deprecated public static double getRadius()
      Deprecated.
      use WGS84_EARTH_RADIUS_METERS
      Get canonical radius of spherical earth, in meters
    • isSpherical

      public boolean isSpherical()
    • getMajor

      public double getMajor()
      Get the equatorial radius (semimajor axis) of the earth, in meters.
      Returns:
      equatorial radius (semimajor axis) in meters
    • getMinor

      public double getMinor()
      Get the polar radius (semiminor axis) of the earth, in meters.
      Returns:
      polar radius (semiminor axis) in meters
    • getName

      public String getName()
      Get the Name property.
      Returns:
      The Name
    • getEccentricity

      public double getEccentricity()
      Get the Eccentricity property.
      Returns:
      The Eccentricity
    • getEccentricitySquared

      public double getEccentricitySquared()
      Get the EccentricitySquared property.
      Returns:
      The EccentricitySquared
    • getEquatorRadius

      public double getEquatorRadius()
      Get the EquatorRadius property.
      Returns:
      The EquatorRadius
    • getPoleRadius

      public double getPoleRadius()
      Get the PoleRadius property.
      Returns:
      The PoleRadius
    • getFlattening

      public double getFlattening()
      Get the Flattening property.
      Returns:
      The Flattening
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object