Polar Stereographic Projection. More...
#include <GeographicLib/PolarStereographic.hpp>
Public Member Functions | |
PolarStereographic (real a, real r, real k0) | |
void | SetScale (real lat, real k=real(1)) |
void | Forward (bool northp, real lat, real lon, real &x, real &y, real &gamma, real &k) const throw () |
void | Reverse (bool northp, real x, real y, real &lat, real &lon, real &gamma, real &k) const throw () |
void | Forward (bool northp, real lat, real lon, real &x, real &y) const throw () |
void | Reverse (bool northp, real x, real y, real &lat, real &lon) const throw () |
Inspector functions | |
Math::real | MajorRadius () const throw () |
Math::real | InverseFlattening () const throw () |
Math::real | CentralScale () const throw () |
Static Public Attributes | |
static const PolarStereographic | UPS |
Polar Stereographic Projection.
Implementation taken from the report,
This is a straightforward implementation of the equations in Snyder except that Newton's method is used to invert the projection.
Definition at line 29 of file PolarStereographic.hpp.
GeographicLib::PolarStereographic::PolarStereographic | ( | real | a, | |
real | r, | |||
real | k0 | |||
) |
Constructor for a ellipsoid with
[in] | a | equatorial radius (meters) |
[in] | r | reciprocal flattening. Setting r = 0 implies r = inf or flattening = 0 (i.e., a sphere). Negative r indicates a prolate ellipsoid. |
[in] | k0 | central scale factor. |
An exception is thrown if either of the axes of the ellipsoid is not positive a or if k0 is not positive.
Definition at line 27 of file PolarStereographic.cpp.
void GeographicLib::PolarStereographic::SetScale | ( | real | lat, | |
real | k = real(1) | |||
) |
Set the scale for the projection.
[in] | lat | (degrees) assuming northp = true. |
[in] | k | scale at latitude lat (default 1). |
This allows a "latitude of true scale" to be specified. An exception is thrown if k is not positive or if lat is not in the range (-90, 90].
Definition at line 125 of file PolarStereographic.cpp.
References Forward().
void GeographicLib::PolarStereographic::Forward | ( | bool | northp, | |
real | lat, | |||
real | lon, | |||
real & | x, | |||
real & | y, | |||
real & | gamma, | |||
real & | k | |||
) | const throw () |
Forward projection, from geographic to polar stereographic.
[in] | northp | the pole which is the center of projection (true means north, false means south). |
[in] | lat | latitude of point (degrees). |
[in] | lon | longitude of point (degrees). |
[out] | x | easting of point (meters). |
[out] | y | northing of point (meters). |
[out] | gamma | meridian convergence at point (degrees). |
[out] | k | scale of projection at point. |
No false easting or northing is added. lat should be in the range (-90, 90] for northp = true and in the range [-90, 90) for northp = false; lon should be in the range [-180, 360].
Definition at line 72 of file PolarStereographic.cpp.
References GeographicLib::Math::hypot().
Referenced by GeographicLib::UTMUPS::Forward(), Forward(), and SetScale().
void GeographicLib::PolarStereographic::Reverse | ( | bool | northp, | |
real | x, | |||
real | y, | |||
real & | lat, | |||
real & | lon, | |||
real & | gamma, | |||
real & | k | |||
) | const throw () |
Reverse projection, from polar stereographic to geographic.
[in] | northp | the pole which is the center of projection (true means north, false means south). |
[in] | x | easting of point (meters). |
[in] | y | northing of point (meters). |
[out] | lat | latitude of point (degrees). |
[out] | lon | longitude of point (degrees). |
[out] | gamma | meridian convergence at point (degrees). |
[out] | k | scale of projection at point. |
No false easting or northing is added. The value of lon returned is in the range [-180, 180).
Definition at line 95 of file PolarStereographic.cpp.
References GeographicLib::Math::hypot().
Referenced by GeographicLib::UTMUPS::Reverse(), and Reverse().
void GeographicLib::PolarStereographic::Forward | ( | bool | northp, | |
real | lat, | |||
real | lon, | |||
real & | x, | |||
real & | y | |||
) | const throw () [inline] |
PolarStereographic::Forward without returning the convergence and scale.
Definition at line 111 of file PolarStereographic.hpp.
References Forward().
void GeographicLib::PolarStereographic::Reverse | ( | bool | northp, | |
real | x, | |||
real | y, | |||
real & | lat, | |||
real & | lon | |||
) | const throw () [inline] |
PolarStereographic::Reverse without returning the convergence and scale.
Definition at line 120 of file PolarStereographic.hpp.
References Reverse().
Math::real GeographicLib::PolarStereographic::MajorRadius | ( | ) | const throw () [inline] |
Definition at line 133 of file PolarStereographic.hpp.
Math::real GeographicLib::PolarStereographic::InverseFlattening | ( | ) | const throw () [inline] |
Definition at line 140 of file PolarStereographic.hpp.
Math::real GeographicLib::PolarStereographic::CentralScale | ( | ) | const throw () [inline] |
The central scale for the projection. This is the value of k0 used in the constructor and is the scale at the pole unless overridden by PolarStereographic::SetScale.
Definition at line 147 of file PolarStereographic.hpp.
const PolarStereographic GeographicLib::PolarStereographic::UPS [static] |
A global instantiation of PolarStereographic with the WGS84 ellipsoid and the UPS scale factor. However, unlike UPS, no false easting or northing is added.
Definition at line 155 of file PolarStereographic.hpp.
Referenced by GeographicLib::UTMUPS::Forward(), and GeographicLib::UTMUPS::Reverse().