Package ucar.unidata.geoloc
Class Earth
- java.lang.Object
-
- ucar.unidata.geoloc.Earth
-
- Direct Known Subclasses:
EarthEllipsoid
@Immutable public class Earth extends Object
Defines the shape of the earth ellipsoid.
-
-
Field Summary
Fields Modifier and Type Field Description static Earth
DEFAULT
static double
WGS84_EARTH_RADIUS_KM
Get canonical radius of the spherical earth in km from "WGS 84"static double
WGS84_EARTH_RADIUS_METERS
Get canonical radius of the spherical earth in meters from "WGS 84"
-
Constructor Summary
Constructors Constructor Description Earth()
Spherical earth with canonical radius.Earth(double radius)
Assume a spherical cow, I mean 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
double
getEccentricity()
Get the Eccentricity .double
getEccentricitySquared()
Get the Eccentricity squared.double
getEquatorRadius()
Get the Equatorial Radius in meters.double
getFlattening()
Get the Flattening.double
getMajor()
Get the equatorial radius (semimajor axis) of the earth, in meters.double
getMinor()
Get the polar radius (semiminor axis) of the earth, in meters.String
getName()
Get the Name.double
getPoleRadius()
Get the Polar Radius in meters.int
hashCode()
boolean
isSpherical()
Is this a spherical earth?String
toString()
-
-
-
Field Detail
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Constructor Detail
-
Earth
public Earth()
Spherical earth with canonical radius.
-
Earth
public Earth(double radius)
Assume a spherical cow, I mean 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 specifiedpoleRadius
- polar radius (semiminor axis) in metersreciprocalFlattening
- 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 specifiedpoleRadius
- polar radius (semiminor axis) in meters; if reciprocalFlattening != 0 then this is ignoredreciprocalFlattening
- inverse flattening = 1/flattening = a / (a-b); if 0 use the poleRadius to calculatename
- name of the Earth
-
-
Method Detail
-
isSpherical
public boolean isSpherical()
Is this a spherical earth?
-
getMajor
public double getMajor()
Get the equatorial radius (semimajor axis) of the earth, in meters.
-
getMinor
public double getMinor()
Get the polar radius (semiminor axis) of the earth, in meters.
-
getName
public String getName()
Get the Name.
-
getEccentricity
public double getEccentricity()
Get the Eccentricity .
-
getEccentricitySquared
public double getEccentricitySquared()
Get the Eccentricity squared.
-
getEquatorRadius
public double getEquatorRadius()
Get the Equatorial Radius in meters.
-
getPoleRadius
public double getPoleRadius()
Get the Polar Radius in meters.
-
getFlattening
public double getFlattening()
Get the Flattening.
-
-