GeographicLib 2.6
Loading...
Searching...
No Matches
GeographicLib::Triaxial::Conformal3 Class Reference

Jacobi's conformal projection of a triaxial ellipsoid. More...

#include <GeographicLib/Triaxial/Conformal3.hpp>

Public Types

using vec3 = Ellipsoid3::vec3

Public Member Functions

 Conformal3 (const Ellipsoid3 &t=Ellipsoid3{})
 Conformal3 (real a, real b, real c)
 Conformal3 (real b, real e2, real k2, real kp2)
Math::real x0 () const
Math::real x (Angle omg) const
Math::real x (real omg) const
Angle omega (real x) const
Math::real omegad (real x) const
Math::real y0 () const
Math::real y (Angle bet) const
Math::real y (real bet) const
Angle beta (real y) const
Math::real betad (real y) const
void Forward (Angle bet, Angle omg, real &x, real &y) const
void Forward (real bet, real omg, real &x, real &y) const
void Forward (Angle bet, Angle omg, real &x, real &y, real &m) const
void Forward (real bet, real omg, real &x, real &y, real &m) const
void Reverse (real x, real y, Angle &bet, Angle &omg) const
void Reverse (real x, real y, real &bet, real &omg) const
void Reverse (real x, real y, Angle &bet, Angle &omg, real &m) const
void Reverse (real x, real y, real &bet, real &omg, real &m) const
void ForwardSphere (Angle bet, Angle omg, vec3 &r, vec3 &v, real &m) const
void ForwardSphere (real bet, real omg, vec3 &r, vec3 &v, real &m) const
void ReverseSphere (vec3 r, vec3 v, Angle &bet, Angle &omg, Angle &gam, real &m) const
void ReverseSphere (vec3 r, vec3 v, real &bet, real &omg, real &gam, real &m) const
void ForwardOther (const Conformal3 &alt, Angle bet, Angle omg, Angle &betalt, Angle &omgalt, Angle &gam, real &m) const
void ForwardOther (const Conformal3 &alt, real bet, real omg, real &betalt, real &omgalt, real &gam, real &m) const
void ReverseOther (const Conformal3 &alt, Angle betalt, Angle omgalt, Angle &bet, Angle &omg, Angle &gam, real &m) const
void ReverseOther (const Conformal3 &alt, real betalt, real omgalt, real &bet, real &omg, real &gam, real &m) const
const Ellipsoid3t ()
const Ellipsoid3s ()

Detailed Description

Jacobi's conformal projection of a triaxial ellipsoid.

This is a conformal projection of the ellipsoid to a plane in which the grid lines are straight; see Jacobi, Vorlesungen über Dynamik, §28. The constructor takes the semi-axes of the ellipsoid (which must be in order). Member functions map the ellipsoidal coordinates ω and β separately to x and y. Jacobi's coordinates have been multiplied by \(eb/2\) so that the customary results are returned in the cases of a sphere or an ellipsoid of revolution. In particular the scale satisfies \(m\ge 1\) with \(m = 1\) at \(\cos\beta = \sin\omega = 1\). (Note: usually GeographicLib uses \(k\) to denote the scale. However, in order to avoid confusion with the oblateness parameter \(k\) used to specify the triaxial ellipsoid, the symbol \(m\) is used for the scale in this class.)

The ellipsoid is oriented so that the major principal ellipse, \(Z=0\), is the equator, \(\beta=0\), while the minor principal ellipse, \(X=0\), is the meridian, \(\omega\pm\pi/2\). The four umbilic points, \(\sin\omega = \cos\beta = 0\), lie on median principal ellipse in the plane \(Y=0\).

In this projection the easting, x, depends only on the longitude \(\omega\) and the northing, y depends only on the latitude \(\beta\). Thus lines of constant latitude and longitude map to straight lines. For a general ellipsoid, each octant of the ellipsoid maps to a finite rectangle of dimensions x0() x y0(). For an oblate (resp. prolate) ellipsoid, x0() (resp. y0()) diverges.

For any ellipsoid, we define a "conformal sphere" which has exactly the same extent for the mapping of an octant. This allows points on the ellipsoid to be conformally mapped to a sphere. This in turn allows any triaxial ellipsoid to be conformally mapped to any other triaxial ellipsoid.

The units for the easting and the northing are the same as the units uses to specify the size of the ellipsoid.

For more information on this projection, see Jacobi's conformal projection.

Example of use:

// Example of using the Triaxial::Conformal3 class.
#include <iostream>
#include <iomanip>
#include <exception>
using namespace std;
using namespace GeographicLib;
int main() {
try {
cout << fixed << setprecision(1)
<< "Ellipsoid parameters: a = " << proj.t().a()
<< ", b = " << proj.t().b() << ", c = " << proj.t().c() << "\n"
<< setprecision(3)
<< "Quadrants: x = " << proj.x0() << ", y = " << proj.y0() << "\n";
cout << "Coordinates angle (deg) x (m) y (m):\n";
cout << setprecision(2);
for (int i = -180; i <= 180; i += 15) {
double omg = i + 90, bet = i,
x = proj.x(Angle(omg)), y = proj.y(Angle(bet));
cout << i << " " << x << " " << y << "\n";
}
}
catch (const exception& e) {
cerr << "Caught exception: " << e.what() << "\n";
return 1;
}
}
int main(int argc, const char *const argv[])
Header for GeographicLib::Triaxial::Conformal3 class.
Jacobi's conformal projection of a triaxial ellipsoid.
Math::real x(Angle omg) const
Math::real y(Angle bet) const
static const Ellipsoid3 & Earth()
Namespace for GeographicLib.
AngleT< Math::real > Angle
Definition Angle.hpp:760

Conformal3Proj is a command-line utility providing access to the functionality of Conformal3.

Definition at line 67 of file Conformal3.hpp.

Member Typedef Documentation

◆ vec3

Constructor & Destructor Documentation

◆ Conformal3() [1/3]

GeographicLib::Triaxial::Conformal3::Conformal3 ( const Ellipsoid3 & t = Ellipsoid3{})

Constructor for a triaxial ellipsoid defined by Ellipsoid3 object.

Parameters
[in]tthe Ellipsoid3 object.

Definition at line 20 of file Conformal3.cpp.

References t().

Referenced by Conformal3(), Conformal3(), ForwardOther(), ForwardOther(), ReverseOther(), and ReverseOther().

◆ Conformal3() [2/3]

GeographicLib::Triaxial::Conformal3::Conformal3 ( real a,
real b,
real c )

Constructor for a trixial ellipsoid with semi-axes.

Parameters
[in]athe largest semi-axis.
[in]bthe middle semi-axis.
[in]cthe smallest semi-axis.
Exceptions
GeographicErrif the required ordering is semiaxes is violated.

The semi-axes must satisfy abc > 0. If a = c (a sphere), then the oblate limit is taken.

Definition at line 38 of file Conformal3.cpp.

References Conformal3().

◆ Conformal3() [3/3]

GeographicLib::Triaxial::Conformal3::Conformal3 ( real b,
real e2,
real k2,
real kp2 )

Alternate constructor for a triaxial ellipsoid.

Parameters
[in]bthe middle semi-axis.
[in]e2the eccentricity squared \(e^2 = (a^2 - c^2)/b^2\).
[in]k2the oblateness parameter squared \(k^2 = (b^2 - c^2) / (a^2 - c^2)\).
[in]kp2the prolateness parameter squared \(k'^2= (a^2 - b^2) / (a^2 - c^2)\).
Exceptions
GeographicErrif the required ordering is semiaxes is violated.
Note
The constructor normalizes k2 and kp2 to ensure then k2 + kp2 = 1.

Definition at line 41 of file Conformal3.cpp.

References Conformal3().

Member Function Documentation

◆ x0()

Math::real GeographicLib::Triaxial::Conformal3::x0 ( ) const
inline
Returns
the quadrant length in the x direction.

Definition at line 147 of file Conformal3.hpp.

◆ x() [1/2]

Math::real GeographicLib::Triaxial::Conformal3::x ( Angle omg) const

◆ x() [2/2]

Math::real GeographicLib::Triaxial::Conformal3::x ( real omg) const
inline

The x projection.

Parameters
[in]omgthe longitude ω (in degrees).
Returns
x.

Definition at line 161 of file Conformal3.hpp.

References x().

◆ omega()

Angle GeographicLib::Triaxial::Conformal3::omega ( real x) const

The inverse x projection.

Parameters
[in]xthe easting.
Returns
the longitude ω as an Angle.

Definition at line 155 of file Conformal3.cpp.

References GeographicLib::AngleT< T >::modang(), GeographicLib::Math::sq(), and x().

Referenced by omegad(), Reverse(), and ReverseSphere().

◆ omegad()

Math::real GeographicLib::Triaxial::Conformal3::omegad ( real x) const
inline

The inverse x projection.

Parameters
[in]xthe easting.
Returns
the longitude ω in degrees.

Definition at line 177 of file Conformal3.hpp.

References omega(), and x().

◆ y0()

Math::real GeographicLib::Triaxial::Conformal3::y0 ( ) const
inline
Returns
the quadrant length in the y direction.

Definition at line 183 of file Conformal3.hpp.

◆ y() [1/2]

Math::real GeographicLib::Triaxial::Conformal3::y ( Angle bet) const

◆ y() [2/2]

Math::real GeographicLib::Triaxial::Conformal3::y ( real bet) const
inline

The y projection.

Parameters
[in]betthe latitude β (in degrees).
Returns
the northing.

Definition at line 197 of file Conformal3.hpp.

References y().

◆ beta()

Angle GeographicLib::Triaxial::Conformal3::beta ( real y) const

The inverse y projection.

Parameters
[in]ythe northing.
Returns
the latitude β as an Angle.

Definition at line 165 of file Conformal3.cpp.

References GeographicLib::AngleT< T >::modang(), GeographicLib::Math::sq(), and y().

Referenced by betad(), Reverse(), Reverse(), Reverse(), ReverseOther(), ReverseSphere(), and ReverseSphere().

◆ betad()

Math::real GeographicLib::Triaxial::Conformal3::betad ( real y) const
inline

The inverse y projection.

Parameters
[in]ythe northing.
Returns
the latitude β in degrees.

Definition at line 213 of file Conformal3.hpp.

References beta(), and y().

◆ Forward() [1/4]

void GeographicLib::Triaxial::Conformal3::Forward ( Angle bet,
Angle omg,
real & x,
real & y ) const

The forward projection.

Parameters
[in]betthe ellipsoidal latitude.
[in]omgthe ellipsoidal longitude.
[out]xthe easting.
[out]ythe easting.

Definition at line 169 of file Conformal3.cpp.

References x(), and y().

Referenced by Forward(), Forward(), Forward(), and ForwardSphere().

◆ Forward() [2/4]

void GeographicLib::Triaxial::Conformal3::Forward ( real bet,
real omg,
real & x,
real & y ) const
inline

The forward projection in degrees

Parameters
[in]betthe ellipsoidal latitude (in degrees).
[in]omgthe ellipsoidal longitude (in degrees).
[out]xthe easting.
[out]ythe easting.

Definition at line 233 of file Conformal3.hpp.

References Forward(), x(), and y().

◆ Forward() [3/4]

void GeographicLib::Triaxial::Conformal3::Forward ( Angle bet,
Angle omg,
real & x,
real & y,
real & m ) const

The forward projection with the scale.

Parameters
[in]betthe ellipsoidal latitude.
[in]omgthe ellipsoidal longitude.
[out]xthe easting.
[out]ythe easting.
[out]mthe scale.

The meridian convergence for this projection is 0.

Definition at line 175 of file Conformal3.cpp.

References Forward(), x(), and y().

◆ Forward() [4/4]

void GeographicLib::Triaxial::Conformal3::Forward ( real bet,
real omg,
real & x,
real & y,
real & m ) const
inline

The forward projection in degrees with the scale.

Parameters
[in]betthe ellipsoidal latitude (in degrees).
[in]omgthe ellipsoidal longitude (in degrees).
[out]xthe easting.
[out]ythe easting.
[out]mthe scale.

The meridian convergence for this projection is 0.

Definition at line 259 of file Conformal3.hpp.

References Forward(), x(), and y().

◆ Reverse() [1/4]

void GeographicLib::Triaxial::Conformal3::Reverse ( real x,
real y,
Angle & bet,
Angle & omg ) const

The reverse projection.

Parameters
[in]xthe easting.
[in]ythe easting.
[out]betthe ellipsoidal latitude.
[out]omgthe ellipsoidal longitude.

Definition at line 172 of file Conformal3.cpp.

References beta(), omega(), x(), and y().

Referenced by Reverse(), Reverse(), and Reverse().

◆ Reverse() [2/4]

void GeographicLib::Triaxial::Conformal3::Reverse ( real x,
real y,
real & bet,
real & omg ) const
inline

The reverse projection in degrees.

Parameters
[in]xthe easting.
[in]ythe easting.
[out]betthe ellipsoidal latitude (in degrees).
[out]omgthe ellipsoidal longitude (in degrees).

Definition at line 279 of file Conformal3.hpp.

References beta(), Reverse(), x(), and y().

◆ Reverse() [3/4]

void GeographicLib::Triaxial::Conformal3::Reverse ( real x,
real y,
Angle & bet,
Angle & omg,
real & m ) const

The reverse projection with the scale.

Parameters
[in]xthe easting.
[in]ythe easting.
[out]betthe ellipsoidal latitude.
[out]omgthe ellipsoidal longitude.
[out]mthe scale.

The meridian convergence for this projection is 0.

Definition at line 179 of file Conformal3.cpp.

References Reverse(), x(), and y().

◆ Reverse() [4/4]

void GeographicLib::Triaxial::Conformal3::Reverse ( real x,
real y,
real & bet,
real & omg,
real & m ) const
inline

The reverse projection in degrees with the scale.

Parameters
[in]xthe easting.
[in]ythe easting.
[out]betthe ellipsoidal latitude (in degrees).
[out]omgthe ellipsoidal longitude (in degrees).
[out]mthe scale.

The meridian convergence for this projection is 0.

Definition at line 307 of file Conformal3.hpp.

References beta(), Reverse(), x(), and y().

◆ ForwardSphere() [1/2]

void GeographicLib::Triaxial::Conformal3::ForwardSphere ( Angle bet,
Angle omg,
vec3 & r,
vec3 & v,
real & m ) const

The forward projection onto the conformal sphere.

Parameters
[in]betthe ellipsoidal latitude.
[in]omgthe ellipsoidal longitude.
[out]rthe projected position on the sphere
[out]vthe projected direction for due north on the triaxial ellipsoid.
[out]mthe scale.

Definition at line 308 of file Conformal3.cpp.

References Forward(), GeographicLib::AngleT< T >::s(), GeographicLib::Math::sq(), x(), and y().

Referenced by ForwardOther(), and ForwardSphere().

◆ ForwardSphere() [2/2]

void GeographicLib::Triaxial::Conformal3::ForwardSphere ( real bet,
real omg,
vec3 & r,
vec3 & v,
real & m ) const
inline

The forward projection in degrees onto the conformal sphere.

Parameters
[in]betthe ellipsoidal latitude (in degrees).
[in]omgthe ellipsoidal longitude (in degrees).
[out]rthe projected position on the sphere
[out]vthe projected direction for due north on the triaxial ellipsoid.
[out]mthe scale.

Definition at line 333 of file Conformal3.hpp.

References ForwardSphere().

◆ ReverseSphere() [1/2]

void GeographicLib::Triaxial::Conformal3::ReverseSphere ( vec3 r,
vec3 v,
Angle & bet,
Angle & omg,
Angle & gam,
real & m ) const

The reverse projection from the conformal sphere.

Parameters
[in]rthe position on the sphere.
[in]va reference direction.
[out]betthe ellipsoidal latitude.
[out]omgthe ellipsoidal longitude.
[out]gamthe meridian convergence.
[out]mthe scale.

Here v is the direction of grid north in some projection and gam is the resulting meridian convergence.

Definition at line 322 of file Conformal3.cpp.

References GeographicLib::Triaxial::Ellipsoid3::AngNorm(), beta(), GeographicLib::AngleT< T >::c(), omega(), GeographicLib::AngleT< T >::s(), GeographicLib::Math::sq(), x(), and y().

Referenced by ForwardOther(), and ReverseSphere().

◆ ReverseSphere() [2/2]

void GeographicLib::Triaxial::Conformal3::ReverseSphere ( vec3 r,
vec3 v,
real & bet,
real & omg,
real & gam,
real & m ) const
inline

The reverse projection in degrees from the conformal sphere.

Parameters
[in]rthe position on the sphere.
[in]va reference direction.
[out]betthe ellipsoidal latitude (in degrees).
[out]omgthe ellipsoidal longitude (in degrees).
[out]gamthe meridian convergence (in degrees).
[out]mthe scale.

Here v is the direction of grid north in some projection and gam is the resulting meridian convergence.

Definition at line 364 of file Conformal3.hpp.

References beta(), and ReverseSphere().

◆ ForwardOther() [1/2]

void GeographicLib::Triaxial::Conformal3::ForwardOther ( const Conformal3 & alt,
Angle bet,
Angle omg,
Angle & betalt,
Angle & omgalt,
Angle & gam,
real & m ) const

The forward conformal projection to some other ellipsoid.

Parameters
[in]altthe Conformal3 object for the other ellipsoid.
[in]betthe ellipsoidal latitude.
[in]omgthe ellipsoidal longitude.
[out]betaltthe ellipsoidal latitude on the other ellipsoid.
[out]omgaltthe ellipsoidal longitude on the other ellipsoid.
[out]gamthe meridian convergence.
[out]mthe scale.

Definition at line 338 of file Conformal3.cpp.

References GeographicLib::Triaxial::Ellipsoid3::b(), Conformal3(), ForwardSphere(), and ReverseSphere().

Referenced by ForwardOther(), and ReverseOther().

◆ ForwardOther() [2/2]

void GeographicLib::Triaxial::Conformal3::ForwardOther ( const Conformal3 & alt,
real bet,
real omg,
real & betalt,
real & omgalt,
real & gam,
real & m ) const
inline

The forward conformal projection in degrees to some other ellipsoid.

Parameters
[in]altthe Conformal3 object for the other ellipsoid.
[in]betthe ellipsoidal latitude (in degrees).
[in]omgthe ellipsoidal longitude (in degrees).
[out]betaltthe ellipsoidal latitude on the other ellipsoid (in degrees).
[out]omgaltthe ellipsoidal longitude on the other ellipsoid (in degrees).
[out]gamthe meridian convergence (in degrees).
[out]mthe scale.

Definition at line 397 of file Conformal3.hpp.

References Conformal3(), and ForwardOther().

◆ ReverseOther() [1/2]

void GeographicLib::Triaxial::Conformal3::ReverseOther ( const Conformal3 & alt,
Angle betalt,
Angle omgalt,
Angle & bet,
Angle & omg,
Angle & gam,
real & m ) const

The reverse conformal projection from some other ellipsoid.

Parameters
[in]altthe Conformal3 object for the other ellipsoid.
[in]betaltthe ellipsoidal latitude on the other ellipsoid.
[in]omgaltthe ellipsoidal longitude on the other ellipsoid.
[out]betthe ellipsoidal latitude.
[out]omgthe ellipsoidal longitude.
[out]gamthe meridian convergence.
[out]mthe scale.

Definition at line 350 of file Conformal3.cpp.

References Conformal3(), and ForwardOther().

Referenced by ReverseOther().

◆ ReverseOther() [2/2]

void GeographicLib::Triaxial::Conformal3::ReverseOther ( const Conformal3 & alt,
real betalt,
real omgalt,
real & bet,
real & omg,
real & gam,
real & m ) const
inline

The reverse conformal projection in degrees from some other ellipsoid.

Parameters
[in]altthe Conformal3 object for the other ellipsoid.
[in]betaltthe ellipsoidal latitude on the other ellipsoid (in degrees).
[in]omgaltthe ellipsoidal longitude on the other ellipsoid (in degrees).
[out]betthe ellipsoidal latitude (in degrees).
[out]omgthe ellipsoidal longitude (in degrees).
[out]gamthe meridian convergence (in degrees).
[out]mthe scale.

Definition at line 431 of file Conformal3.hpp.

References beta(), Conformal3(), and ReverseOther().

◆ t()

const Ellipsoid3 & GeographicLib::Triaxial::Conformal3::t ( )
inline
Returns
the Ellipsoid3 object for this projection.

Definition at line 442 of file Conformal3.hpp.

Referenced by Conformal3().

◆ s()

const Ellipsoid3 & GeographicLib::Triaxial::Conformal3::s ( )
inline
Returns
the Ellipsoid3 object for the conformal sphere.

Definition at line 446 of file Conformal3.hpp.


The documentation for this class was generated from the following files: