.NET wrapper for GeographicLib::Ellipsoid. More...
#include <Ellipsoid.h>
Public Member Functions | |
~Ellipsoid () | |
Constructor | |
Ellipsoid () | |
Ellipsoid (double a, double f) | |
Latitude conversion. | |
double | ParametricLatitude (double phi) |
double | InverseParametricLatitude (double beta) |
double | GeocentricLatitude (double phi) |
double | InverseGeocentricLatitude (double theta) |
double | RectifyingLatitude (double phi) |
double | InverseRectifyingLatitude (double mu) |
double | AuthalicLatitude (double phi) |
double | InverseAuthalicLatitude (double xi) |
double | ConformalLatitude (double phi) |
double | InverseConformalLatitude (double chi) |
double | IsometricLatitude (double phi) |
double | InverseIsometricLatitude (double psi) |
Other quantities. | |
double | CircleRadius (double phi) |
double | CircleHeight (double phi) |
double | MeridianDistance (double phi) |
double | MeridionalCurvatureRadius (double phi) |
double | TransverseCurvatureRadius (double phi) |
double | NormalCurvatureRadius (double phi, double azi) |
Static Public Member Functions | |
Eccentricity conversions. | |
static double | SecondFlatteningToFlattening (double fp) |
static double | FlatteningToSecondFlattening (double f) |
static double | ThirdFlatteningToFlattening (double n) |
static double | FlatteningToThirdFlattening (double f) |
static double | EccentricitySqToFlattening (double e2) |
static double | FlatteningToEccentricitySq (double f) |
static double | SecondEccentricitySqToFlattening (double ep2) |
static double | FlatteningToSecondEccentricitySq (double f) |
static double | ThirdEccentricitySqToFlattening (double epp2) |
static double | FlatteningToThirdEccentricitySq (double f) |
Public Attributes | |
Ellipsoid dimensions. | |
property double | MajorRadius { double get() |
property double | MinorRadius { double get() |
property double | QuarterMeridian { double get() |
property double | Area { double get() |
property double | Volume { double get() |
Ellipsoid shape | |
property double | Flattening { double get() |
property double | SecondFlattening { double get() |
property double | ThirdFlattening { double get() |
property double | EccentricitySq { double get() |
property double | SecondEccentricitySq { double get() |
property double | ThirdEccentricitySq { double get() |
Private Member Functions | |
!Ellipsoid () | |
Private Attributes | |
GeographicLib::Ellipsoid * | m_pEllipsoid |
.NET wrapper for GeographicLib::Ellipsoid.
This class allows .NET applications to access GeographicLib::Ellipsoid.
This class returns various properties of the ellipsoid and converts between various types of latitudes. The latitude conversions are also possible using the various projections supported by GeographicLib; but Ellipsoid provides more direct access (sometimes using private functions of the projection classes). Ellipsoid::RectifyingLatitude, Ellipsoid::InverseRectifyingLatitude, and Ellipsoid::MeridianDistance provide functionality which can be provided by the Geodesic class. However Geodesic uses a series approximation (valid for abs f < 1/150), whereas Ellipsoid computes these quantities using EllipticFunction which provides accurate results even when f is large. Use of this class should be limited to −3 < f < 3/4 (i.e., 1/4 < b/a < 4).
C# Example:
Managed C++ Example:
Visual Basic Example:
INTERFACE DIFFERENCES:
A default constructor has been provided that assumes a WGS84 ellipsoid.
The following functions are implemented as properties: MajorRadius, MinorRadius, QuarterMeridian, Area, Volume, Flattening, SecondFlattening, ThirdFlattening, EccentricitySq, SecondEccentricitySq, and ThirdEccentricitySq.
Definition at line 47 of file Ellipsoid.h.
|
private |
Definition at line 21 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
Ellipsoid::Ellipsoid | ( | ) |
Constructor for a WGS84 ellipsoid
Definition at line 31 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
Ellipsoid::Ellipsoid | ( | double | a, |
double | f | ||
) |
Constructor for a ellipsoid with
[in] | a | equatorial radius (meters). |
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. |
GeographicErr | if a or (1 − f ) a is not positive. |
Definition at line 44 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
inline |
The destructor calls the finalizer.
Definition at line 79 of file Ellipsoid.h.
double Ellipsoid::AuthalicLatitude | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
The authalic latitude, ξ, has the property that the area of the ellipsoid between two circles with authalic latitudes ξ1 and ξ2 is equal to (sin ξ2 - sin ξ1) A / 2, where A = Area(). For a sphere ξ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value ξ lies in [−90°, 90°].
Definition at line 97 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::CircleHeight | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 139 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::CircleRadius | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 133 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::ConformalLatitude | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
The conformal latitude, χ, gives the mapping of the ellipsoid to a sphere which which is conformal (angles are preserved) and in which the equator of the ellipsoid maps to the equator of the sphere. For a sphere χ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value χ lies in [−90°, 90°].
Definition at line 109 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | e2 | = e2 = (a2 − b2) / a2, the eccentricity squared. |
e2 should lie in (−∞, 1). The returned value f lies in (−∞, 1).
Definition at line 193 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value e2 lies in (−∞, 1).
Definition at line 199 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value e' 2 lies in (−1, ∞).
Definition at line 211 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value f ' lies in (−1, ∞).
Definition at line 175 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value e'' 2 lies in (−1, 1).
Definition at line 223 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value n lies in (−1, 1).
Definition at line 187 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::GeocentricLatitude | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
The geocentric latitude, θ, is the angle beween the equatorial plane and a line between the center of the ellipsoid and a point on the ellipsoid. For a sphere θ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value θ lies in [−90°, 90°].
Definition at line 73 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::InverseAuthalicLatitude | ( | double | xi | ) |
[in] | xi | the authalic latitude (degrees). |
ξ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 103 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::InverseConformalLatitude | ( | double | chi | ) |
[in] | chi | the conformal latitude (degrees). |
χ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 115 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::InverseGeocentricLatitude | ( | double | theta | ) |
[in] | theta | the geocentric latitude (degrees). |
θ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 79 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::InverseIsometricLatitude | ( | double | psi | ) |
[in] | psi | the isometric latitude (degrees). |
The returned value φ lies in [−90°, 90°].
Definition at line 127 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::InverseParametricLatitude | ( | double | beta | ) |
[in] | beta | the parametric latitude (degrees). |
β must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 67 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::InverseRectifyingLatitude | ( | double | mu | ) |
[in] | mu | the rectifying latitude (degrees). |
μ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 91 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::IsometricLatitude | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
The isometric latitude gives the mapping of the ellipsoid to a plane which which is conformal (angles are preserved) and in which the equator of the ellipsoid maps to a straight line of constant scale; this mapping defines the Mercator projection. For a sphere ψ = sinh−1 tan φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 121 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::MeridianDistance | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 145 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::MeridionalCurvatureRadius | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 151 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::NormalCurvatureRadius | ( | double | phi, |
double | azi | ||
) |
[in] | phi | the geographic latitude (degrees). |
[in] | azi | the angle between the meridian and the normal section (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 163 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::ParametricLatitude | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
The geographic latitude, φ, is the angle beween the equatorial plane and a vector normal to the surface of the ellipsoid.
The parametric latitude (also called the reduced latitude), β, allows the cartesian coordinated of a meridian to be expressed conveniently in parametric form as
where a and b are the equatorial radius and the polar semi-axis. For a sphere β = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value β lies in [−90°, 90°].
Definition at line 61 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::RectifyingLatitude | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
The rectifying latitude, μ, has the property that the distance along a meridian of the ellipsoid between two points with rectifying latitudes μ1 and μ2 is equal to (μ2 - μ1) L / 90°, where L = QuarterMeridian(). For a sphere μ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value μ lies in [−90°, 90°].
Definition at line 85 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | ep2 | = e' 2 = (a2 − b2) / b2, the second eccentricity squared. |
e' 2 should lie in (−1, ∞). The returned value f lies in (−∞, 1).
Definition at line 205 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | fp | = f ' = (a − b) / b, the second flattening. |
f ' should lie in (−1, ∞). The returned value f lies in (−∞, 1).
Definition at line 169 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | epp2 | = e'' 2 = (a2 − b2) / (a2 + b2), the third eccentricity squared. |
e'' 2 should lie in (−1, 1). The returned value f lies in (−∞, 1).
Definition at line 217 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
|
static |
[in] | n | = (a − b) / (a + b), the third flattening. |
n should lie in (−1, 1). The returned value f lies in (−∞, 1).
Definition at line 181 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
double Ellipsoid::TransverseCurvatureRadius | ( | double | phi | ) |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 157 of file dotnet/NETGeographicLib/Ellipsoid.cpp.
property double NETGeographicLib::Ellipsoid::Area { double get() |
Definition at line 109 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::EccentricitySq { double get() |
Definition at line 151 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::Flattening { double get() |
Definition at line 129 of file Ellipsoid.h.
|
private |
Definition at line 51 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::MajorRadius { double get() |
Definition at line 90 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::MinorRadius { double get() |
Definition at line 95 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::QuarterMeridian { double get() |
Definition at line 102 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::SecondEccentricitySq { double get() |
Definition at line 159 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::SecondFlattening { double get() |
Definition at line 136 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::ThirdEccentricitySq { double get() |
Definition at line 168 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::ThirdFlattening { double get() |
Definition at line 143 of file Ellipsoid.h.
property double NETGeographicLib::Ellipsoid::Volume { double get() |
Definition at line 116 of file Ellipsoid.h.