Class Ellipsoid
- java.lang.Object
-
- org.openstreetmap.josm.data.projection.Ellipsoid
-
public final class Ellipsoid extends java.lang.Object
Reference ellipsoids.
-
-
Field Summary
Fields Modifier and Type Field Description double
a
half long axisstatic Ellipsoid
Airy
Airy 1830static Ellipsoid
AiryMod
Modified Airy 1849static Ellipsoid
AustSA
Australian National Spheroid (Australian Natl & S.double
b
half short axisstatic Ellipsoid
Bessel1841
Bessel 1841 ellipsoidstatic Ellipsoid
BesselNamibia
Bessel 1841 (Namibia)static Ellipsoid
Clarke1866
Clarke 1866 ellipsoidstatic Ellipsoid
Clarke1880
Clarke 1880 (modified)static Ellipsoid
ClarkeIGN
Clarke 1880 IGN (French national geographic institute)double
e
first eccentricity: sqrt(a*a - b*b) / adouble
e2
first eccentricity squared: (a*a - b*b) / (a*a)double
eb2
square of the second eccentricity: (a*a - b*b) / (b*b)static Ellipsoid
Everest
Everest 1830static Ellipsoid
Everest1948
Everest 1948static Ellipsoid
Everest1956
Everest 1956static Ellipsoid
Everest1969
Everest 1969static Ellipsoid
EverestSabahSarawak
Everest (Sabah & Sarawak)static Ellipsoid
Fischer
Fischer (Mercury Datum) 1960static Ellipsoid
Fischer1968
Fischer 1968static Ellipsoid
FischerMod
Modified Fischer 1960static Ellipsoid
GRS67
GRS67 ellipsoidstatic Ellipsoid
GRS80
GRS80 ellipsoidstatic Ellipsoid
Hayford
Hayford's ellipsoid 1909 (ED50 system) Also known as International 1924 Proj.4 code: intlstatic Ellipsoid
Helmert
Helmert 1906static Ellipsoid
Hough
Houghstatic Ellipsoid
Krassowsky
Krassowsky 1940 ellipsoidstatic Ellipsoid
Sphere
Sphereboolean
spherical
if ellipsoid is spherical, i.e. the major and minor semiaxis are the samestatic Ellipsoid
Walbeck
Walbeckstatic Ellipsoid
WGS66
WGS66 ellipsoidstatic Ellipsoid
WGS72
WGS72 ellipsoidstatic Ellipsoid
WGS84
WGS84 ellipsoid
-
Constructor Summary
Constructors Modifier Constructor Description private
Ellipsoid(double a, double b, double e, double e2, double eb2, boolean sperical)
private constructur - use one of the create_* methods
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LatLon
cart2LatLon(double... xyz)
convert cartesian coordinates to ellipsoidal coordinatesLatLon
cart2LatLon(double[] xyz, double epsilon)
static Ellipsoid
createAb(double a, double b)
create a new ellipsoidstatic Ellipsoid
createAes(double a, double es)
create a new ellipsoidstatic Ellipsoid
createAf(double a, double f)
create a new ellipsoidstatic Ellipsoid
createArf(double a, double rf)
create a new ellipsoiddouble
latitude(double latIso, double e, double epsilon)
Returns geographic latitude of isometric latitude of first eccentricity (e) and epsilon precisiondouble
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 coordinatesdouble
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.
-
-
-
Field Detail
-
AustSA
public static final Ellipsoid AustSA
Australian National Spheroid (Australian Natl & S. Amer. 1969) same as GRS67 Modified
-
Bessel1841
public static final Ellipsoid Bessel1841
Bessel 1841 ellipsoid
-
BesselNamibia
public static final Ellipsoid BesselNamibia
Bessel 1841 (Namibia)
-
Clarke1866
public static final Ellipsoid Clarke1866
Clarke 1866 ellipsoid
-
Clarke1880
public static final Ellipsoid Clarke1880
Clarke 1880 (modified)
-
ClarkeIGN
public static final Ellipsoid ClarkeIGN
Clarke 1880 IGN (French national geographic institute)
-
Everest1948
public static final Ellipsoid Everest1948
Everest 1948
-
Everest1956
public static final Ellipsoid Everest1956
Everest 1956
-
Everest1969
public static final Ellipsoid Everest1969
Everest 1969
-
EverestSabahSarawak
public static final Ellipsoid EverestSabahSarawak
Everest (Sabah & Sarawak)
-
FischerMod
public static final Ellipsoid FischerMod
Modified Fischer 1960
-
Fischer1968
public static final Ellipsoid Fischer1968
Fischer 1968
-
Hayford
public static final Ellipsoid Hayford
Hayford's ellipsoid 1909 (ED50 system) Also known as International 1924 Proj.4 code: intl
-
Krassowsky
public static final Ellipsoid Krassowsky
Krassowsky 1940 ellipsoid
-
a
public final double a
half long axis
-
b
public final double b
half short axis
-
e
public final double e
first eccentricity: sqrt(a*a - b*b) / a
-
e2
public final double e2
first eccentricity squared: (a*a - b*b) / (a*a)
-
eb2
public final double eb2
square of the second eccentricity: (a*a - b*b) / (b*b)
-
spherical
public final boolean spherical
if ellipsoid is spherical, i.e. the major and minor semiaxis are the same
-
-
Constructor Detail
-
Ellipsoid
private Ellipsoid(double a, double b, double e, double e2, double eb2, boolean sperical)
private constructur - use one of the create_* methods- Parameters:
a
- semimajor radius of the ellipsoid axisb
- semiminor radius of the ellipsoid axise
- first eccentricity of the ellipsoid ( = sqrt((a*a - b*b)/(a*a)))e2
- first eccentricity squaredeb2
- square of the second eccentricitysperical
- if the ellipsoid is sphere
-
-
Method Detail
-
createAb
public static Ellipsoid createAb(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)- Returns:
- the new ellipsoid
-
createAes
public static Ellipsoid createAes(double a, double es)
create a new ellipsoid- Parameters:
a
- semimajor radius of the ellipsoid axis (in meters)es
- first eccentricity squared- Returns:
- the new ellipsoid
-
createAf
public static Ellipsoid createAf(double a, double f)
create a new ellipsoid- Parameters:
a
- semimajor radius of the ellipsoid axis (in meters)f
- flattening ( = (a - b) / a)- Returns:
- the new ellipsoid
-
createArf
public static Ellipsoid createArf(double a, double rf)
create a new ellipsoid- Parameters:
a
- semimajor radius of the ellipsoid axis (in meters)rf
- inverse flattening- Returns:
- the new ellipsoid
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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).e
- first eccentricity- 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)
Returns geographic latitude of isometric latitude of first eccentricity (e) and epsilon precision- Parameters:
latIso
- isometric latitudee
- first eccentricityepsilon
- epsilon precision- Returns:
- geographic latitude of isometric latitude of first eccentricity (e) and epsilon precision
-
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.
-
-