12 namespace GeographicLib {
18 , _f(f <= 1 ? f : 1/f)
20 , _es((_f < 0 ? -1 : 1) * sqrt(abs(_e2)))
22 , _c( (1 - _f) * exp(
Math::eatanhe(real(1), _es)) )
62 real& x, real& y, real& gamma, real& k)
64 lat *= northp ? 1 : -1;
70 rho = taup >= 0 ? (lat != 90 ? 1/rho : 0) : rho;
71 rho *= 2 * _k0 * _a / _c;
72 k = lat != 90 ? (rho / _a) * secphi * sqrt(_e2m + _e2 /
Math::sq(secphi)) :
77 x = rho * (lon == -180 ? 0 : sin(lam));
78 y = (northp ? -rho : rho) * (abs(lon) == 90 ? 0 : cos(lam));
79 gamma = northp ? lon : -lon;
83 real& lat, real& lon, real& gamma, real& k)
87 t = rho / (2 * _k0 * _a / _c),
88 taup = (1 / t - t) / 2,
92 k = rho ? (rho / _a) * secphi * sqrt(_e2m + _e2 /
Math::sq(secphi)) : _k0;
93 lat = (northp ? 1 : -1) * (rho ? phi /
Math::degree() : 90);
95 gamma = northp ? lon : -lon;
101 if (!(-90 < lat && lat <= 90))
103 real x, y, gamma, kold;
105 Forward(
true, lat, 0, x, y, gamma, kold);
static T AngNormalize(T x)
static bool isfinite(T x)
Mathematical functions needed by GeographicLib.
void Forward(bool northp, real lat, real lon, real &x, real &y, real &gamma, real &k) const
PolarStereographic(real a, real f, real k0)
void Reverse(bool northp, real x, real y, real &lat, real &lon, real &gamma, real &k) const
static const PolarStereographic & UPS()
void SetScale(real lat, real k=real(1))
Polar stereographic projection.
static T tauf(T taup, T es)
Exception handling for GeographicLib.
Header for GeographicLib::PolarStereographic class.
static T taupf(T tau, T es)