GeographicLib: GeographicLib::Triaxial::Conformal3 Class Reference

GeographicLib 2.7

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 Ellipsoid3 & | t ()
const Ellipsoid3 & | s ()

## 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 semiaxes 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 umbilical 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>
#include <GeographicLib/Triaxial/Conformal3.hpp>
using namespace std;
using namespace GeographicLib;
int main() {
try {
Triaxial::Conformal3 proj(Triaxial::Ellipsoid3::Earth());
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;
}
}
main
int main(int argc, const char *const argv[])
Definition Cart3Convert.cpp:52
Conformal3.hpp
Header for GeographicLib::Triaxial::Conformal3 class.
GeographicLib::Triaxial::Conformal3
Jacobi's conformal projection of a triaxial ellipsoid.
Definition Conformal3.hpp:67
GeographicLib::Triaxial::Conformal3::x
Math::real x(Angle omg) const
Definition Conformal3.cpp:149
GeographicLib::Triaxial::Conformal3::y
Math::real y(Angle bet) const
Definition Conformal3.cpp:160
GeographicLib::Triaxial::Ellipsoid3::Earth
static const Ellipsoid3 & Earth()
Definition Ellipsoid3.cpp:226
GeographicLib
Namespace for GeographicLib.
Definition Accumulator.cpp:12
GeographicLib::Angle
AngleT< Math::real > Angle
Definition Angle.hpp:760
std
Definition NearestNeighbor.hpp:806

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

using GeographicLib::Triaxial::Conformal3::vec3 = Ellipsoid3::vec3

Definition at line 108 of file Conformal3.hpp.

## 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] | t | the 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 triaxial ellipsoid with semiaxes.

Parameters

  [in] | a | the largest semiaxis.
  [in] | b | the middle semiaxis.
  [in] | c | the smallest semiaxis.

Exceptions

  GeographicErr | if the required ordering is semiaxes is violated.

The semiaxes must satisfy a ≥ b ≥ c > 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] | b | the middle semiaxis.
  [in] | e2 | the eccentricity squared \(e^2 = (a^2 - c^2)/b^2\).
  [in] | k2 | the oblateness parameter squared \(k^2 = (b^2 - c^2) / (a^2 - c^2)\).
  [in] | kp2 | the prolateness parameter squared \(k'^2= (a^2 - b^2) / (a^2 - c^2)\).

Exceptions

  GeographicErr | if 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

The x projection.

Parameters

  [in] | omg | the longitude ω as an Angle.

Returns
  the easting.

Definition at line 149 of file Conformal3.cpp.

References GeographicLib::AngleT< T >::c(), GeographicLib::AngleT< T >::modang(), GeographicLib::AngleT< T >::n(), GeographicLib::Math::NaN(), and GeographicLib::Math::sq().

Referenced by Forward(), Forward(), Forward(), Forward(), ForwardSphere(), omega(), omegad(), Reverse(), Reverse(), Reverse(), Reverse(), ReverseSphere(), and x().

## ◆ x() [2/2]

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

The x projection.

Parameters

  [in] | omg | the 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] | x | the 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] | x | the 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

The y projection.

Parameters

  [in] | bet | the latitude β as an Angle

Returns
  the northing.

Definition at line 160 of file Conformal3.cpp.

References GeographicLib::AngleT< T >::c(), GeographicLib::AngleT< T >::modang(), GeographicLib::AngleT< T >::n(), GeographicLib::Math::NaN(), and GeographicLib::Math::sq().

Referenced by beta(), betad(), Forward(), Forward(), Forward(), Forward(), ForwardSphere(), Reverse(), Reverse(), Reverse(), Reverse(), ReverseSphere(), and y().

## ◆ y() [2/2]

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

The y projection.

Parameters

  [in] | bet | the 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] | y | the 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] | y | the 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] | bet | the ellipsoidal latitude.
  [in] | omg | the ellipsoidal longitude.
  [out] | x | the easting.
  [out] | y | the 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] | bet | the ellipsoidal latitude (in degrees).
  [in] | omg | the ellipsoidal longitude (in degrees).
  [out] | x | the easting.
  [out] | y | the 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] | bet | the ellipsoidal latitude.
  [in] | omg | the ellipsoidal longitude.
  [out] | x | the easting.
  [out] | y | the easting.
  [out] | m | the 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] | bet | the ellipsoidal latitude (in degrees).
  [in] | omg | the ellipsoidal longitude (in degrees).
  [out] | x | the easting.
  [out] | y | the easting.
  [out] | m | the 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] | x | the easting.
  [in] | y | the easting.
  [out] | bet | the ellipsoidal latitude.
  [out] | omg | the 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] | x | the easting.
  [in] | y | the easting.
  [out] | bet | the ellipsoidal latitude (in degrees).
  [out] | omg | the 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] | x | the easting.
  [in] | y | the easting.
  [out] | bet | the ellipsoidal latitude.
  [out] | omg | the ellipsoidal longitude.
  [out] | m | the 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] | x | the easting.
  [in] | y | the easting.
  [out] | bet | the ellipsoidal latitude (in degrees).
  [out] | omg | the ellipsoidal longitude (in degrees).
  [out] | m | the 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] | bet | the ellipsoidal latitude.
  [in] | omg | the ellipsoidal longitude.
  [out] | r | the projected position on the sphere
  [out] | v | the projected direction for due north on the triaxial ellipsoid.
  [out] | m | the 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] | bet | the ellipsoidal latitude (in degrees).
  [in] | omg | the ellipsoidal longitude (in degrees).
  [out] | r | the projected position on the sphere
  [out] | v | the projected direction for due north on the triaxial ellipsoid.
  [out] | m | the 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] | r | the position on the sphere.
  [in] | v | a reference direction.
  [out] | bet | the ellipsoidal latitude.
  [out] | omg | the ellipsoidal longitude.
  [out] | gam | the meridian convergence.
  [out] | m | the 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] | r | the position on the sphere.
  [in] | v | a reference direction.
  [out] | bet | the ellipsoidal latitude (in degrees).
  [out] | omg | the ellipsoidal longitude (in degrees).
  [out] | gam | the meridian convergence (in degrees).
  [out] | m | the 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] | alt | the Conformal3 object for the other ellipsoid.
  [in] | bet | the ellipsoidal latitude.
  [in] | omg | the ellipsoidal longitude.
  [out] | betalt | the ellipsoidal latitude on the other ellipsoid.
  [out] | omgalt | the ellipsoidal longitude on the other ellipsoid.
  [out] | gam | the meridian convergence.
  [out] | m | the 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] | alt | the Conformal3 object for the other ellipsoid.
  [in] | bet | the ellipsoidal latitude (in degrees).
  [in] | omg | the ellipsoidal longitude (in degrees).
  [out] | betalt | the ellipsoidal latitude on the other ellipsoid (in degrees).
  [out] | omgalt | the ellipsoidal longitude on the other ellipsoid (in degrees).
  [out] | gam | the meridian convergence (in degrees).
  [out] | m | the 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] | alt | the Conformal3 object for the other ellipsoid.
  [in] | betalt | the ellipsoidal latitude on the other ellipsoid.
  [in] | omgalt | the ellipsoidal longitude on the other ellipsoid.
  [out] | bet | the ellipsoidal latitude.
  [out] | omg | the ellipsoidal longitude.
  [out] | gam | the meridian convergence.
  [out] | m | the 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] | alt | the Conformal3 object for the other ellipsoid.
  [in] | betalt | the ellipsoidal latitude on the other ellipsoid (in degrees).
  [in] | omgalt | the ellipsoidal longitude on the other ellipsoid (in degrees).
  [out] | bet | the ellipsoidal latitude (in degrees).
  [out] | omg | the ellipsoidal longitude (in degrees).
  [out] | gam | the meridian convergence (in degrees).
  [out] | m | the 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:

- Conformal3.hpp
- Conformal3.cpp