Package ucar.unidata.geoloc
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Earth
DEFAULT
protected double
eccentricity
protected double
eccentricitySquared
protected double
equatorRadius
protected double
flattening
protected String
name
protected double
poleRadius
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)
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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
double
getEccentricity()
Get the Eccentricity property.double
getEccentricitySquared()
Get the EccentricitySquared property.double
getEquatorRadius()
Get the EquatorRadius property.double
getFlattening()
Get the Flattening property.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 property.double
getPoleRadius()
Get the PoleRadius property.static double
getRadius()
Deprecated.use WGS84_EARTH_RADIUS_METERSint
hashCode()
boolean
isSpherical()
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
-
eccentricity
protected final double eccentricity
-
eccentricitySquared
protected final double eccentricitySquared
-
equatorRadius
protected final double equatorRadius
-
poleRadius
protected final double poleRadius
-
flattening
protected final double flattening
-
name
protected final String name
-
-
Constructor Detail
-
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 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
-
getRadius
@Deprecated public static double getRadius()
Deprecated.use WGS84_EARTH_RADIUS_METERSGet 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
-
-