org.openstreetmap.josm.data.projection
Class Ellipsoid

java.lang.Object
  extended by org.openstreetmap.josm.data.projection.Ellipsoid

public class Ellipsoid
extends java.lang.Object

the reference ellipsoids


Field Summary
 double a
          half long axis
 double b
          half short axis
static Ellipsoid Bessel1841
          Bessel 1841 ellipsoid
static Ellipsoid clarkeIGN
          Clarke 1880 IGN (French national geographic institute)
 double e
          first eccentricity
 double e2
          first eccentricity squared
 double eb2
          square of the second eccentricity
static Ellipsoid GRS80
          GRS80 ellipsoid
static Ellipsoid hayford
          Hayford's ellipsoid 1909 (ED50 system) Proj.4 code: intl
static Ellipsoid WGS84
          WGS84 ellipsoid
 
Constructor Summary
private Ellipsoid(double a, double b, double e, double e2, double eb2)
          private constructur - use one of the create_* methods
 
Method Summary
 LatLon cart2LatLon(double[] XYZ)
          convert cartesian coordinates to ellipsoidal coordinates
 LatLon cart2LatLon(double[] XYZ, double epsilon)
           
static Ellipsoid create_a_b(double a, double b)
          create a new ellipsoid
static Ellipsoid create_a_es(double a, double es)
          create a new ellipsoid
static Ellipsoid create_a_f(double a, double f)
          create a new ellipsoid
static Ellipsoid create_a_rf(double a, double rf)
          create a new ellipsoid
 double latitude(double latIso, double e, double epsilon)
           
 double latitudeIsometric(double phi)
          Returns isometric latitude of phi on first eccentricity (e)
 double latitudeIsometric(double phi, double e)
          Returns isometric latitude of phi on given first eccentricity (e)
 double[] latLon2Cart(LatLon coord)
          convert ellipsoidal coordinates to cartesian coordinates
 double meridionalArc(double phi)
          Returns the meridional arc, the true meridional distance on the ellipsoid from the equator to the specified latitude, in meters.
 double meridionalRadiusOfCurvature(double phi)
          Returns the radius of curvature in the meridian for this reference ellipsoid at the specified latitude.
private static double sqr(double x)
           
 java.lang.String toString()
           
 double verticalRadiusOfCurvature(double phi)
          Returns the radius of curvature in the prime vertical for this reference ellipsoid at the specified latitude.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clarkeIGN

public static final Ellipsoid clarkeIGN
Clarke 1880 IGN (French national geographic institute)


hayford

public static final Ellipsoid hayford
Hayford's ellipsoid 1909 (ED50 system) Proj.4 code: intl


GRS80

public static final Ellipsoid GRS80
GRS80 ellipsoid


WGS84

public static final Ellipsoid WGS84
WGS84 ellipsoid


Bessel1841

public static final Ellipsoid Bessel1841
Bessel 1841 ellipsoid


a

public final double a
half long axis


b

public final double b
half short axis


e

public final double e
first eccentricity


e2

public final double e2
first eccentricity squared


eb2

public final double eb2
square of the second eccentricity

Constructor Detail

Ellipsoid

private Ellipsoid(double a,
                  double b,
                  double e,
                  double e2,
                  double eb2)
private constructur - use one of the create_* methods

Parameters:
a - semimajor radius of the ellipsoid axis
b - semiminor radius of the ellipsoid axis
e - first eccentricity of the ellipsoid ( = sqrt((a*a - b*b)/(a*a)))
e2 - first eccentricity squared
eb2 - square of the second eccentricity
Method Detail

create_a_b

public static Ellipsoid create_a_b(double a,
                                   double b)
create a new ellipsoid

Parameters:
a - semimajor radius of the ellipsoid axis (in meters)
b - semiminor radius of the ellipsoid axis (in meters)

create_a_es

public static Ellipsoid create_a_es(double a,
                                    double es)
create a new ellipsoid

Parameters:
a - semimajor radius of the ellipsoid axis (in meters)
es - first eccentricity squared

create_a_f

public static Ellipsoid create_a_f(double a,
                                   double f)
create a new ellipsoid

Parameters:
a - semimajor radius of the ellipsoid axis (in meters)
f - flattening ( = (a - b) / a)

create_a_rf

public static Ellipsoid create_a_rf(double a,
                                    double rf)
create a new ellipsoid

Parameters:
a - semimajor radius of the ellipsoid axis (in meters)
rf - inverse flattening

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

verticalRadiusOfCurvature

public double verticalRadiusOfCurvature(double phi)
Returns the radius of curvature in the prime vertical for this reference ellipsoid at the specified latitude.

Parameters:
phi - The local latitude (radians).
Returns:
The radius of curvature in the prime vertical (meters).

sqr

private static double sqr(double x)

meridionalArc

public double meridionalArc(double phi)
Returns the meridional arc, the true meridional distance on the ellipsoid from the equator to the specified latitude, in meters.

Parameters:
phi - The local latitude (in radians).
Returns:
The meridional arc (in meters).

meridionalRadiusOfCurvature

public double meridionalRadiusOfCurvature(double phi)
Returns the radius of curvature in the meridian for this reference ellipsoid at the specified latitude.

Parameters:
phi - The local latitude (in radians).
Returns:
The radius of curvature in the meridian (in meters).

latitudeIsometric

public double latitudeIsometric(double phi,
                                double e)
Returns isometric latitude of phi on given first eccentricity (e)

Parameters:
phi - The local latitude (radians).
Returns:
isometric latitude of phi on first eccentricity (e)

latitudeIsometric

public double latitudeIsometric(double phi)
Returns isometric latitude of phi on first eccentricity (e)

Parameters:
phi - The local latitude (radians).
Returns:
isometric latitude of phi on first eccentricity (e)

latitude

public double latitude(double latIso,
                       double e,
                       double epsilon)

cart2LatLon

public LatLon cart2LatLon(double[] XYZ)
convert cartesian coordinates to ellipsoidal coordinates

Parameters:
XYZ - the coordinates in meters (X, Y, Z)
Returns:
The corresponding latitude and longitude in degrees

cart2LatLon

public LatLon cart2LatLon(double[] XYZ,
                          double epsilon)

latLon2Cart

public double[] latLon2Cart(LatLon coord)
convert ellipsoidal coordinates to cartesian coordinates

Parameters:
coord - The Latitude and longitude in degrees
Returns:
the corresponding (X, Y Z) cartesian coordinates in meters.


JOSM