Lambert conformal conic projection. More...
#include <LambertConformalConic.hpp>
Public Member Functions | |
void | Forward (real lon0, real lat, real lon, real &x, real &y) const |
void | Forward (real lon0, real lat, real lon, real &x, real &y, real &gamma, real &k) const |
LambertConformalConic (real a, real f, real sinlat1, real coslat1, real sinlat2, real coslat2, real k1) | |
LambertConformalConic (real a, real f, real stdlat, real k0) | |
LambertConformalConic (real a, real f, real stdlat1, real stdlat2, real k1) | |
void | Reverse (real lon0, real x, real y, real &lat, real &lon) const |
void | Reverse (real lon0, real x, real y, real &lat, real &lon, real &gamma, real &k) const |
void | SetScale (real lat, real k=real(1)) |
Inspector functions | |
Math::real | MajorRadius () const |
Math::real | Flattening () const |
Math::real | OriginLatitude () const |
Math::real | CentralScale () const |
Static Public Member Functions | |
static const LambertConformalConic & | Mercator () |
Private Types | |
typedef Math::real | real |
Private Member Functions | |
real | Deatanhe (real x, real y) const |
void | Init (real sphi1, real cphi1, real sphi2, real cphi2, real k1) |
Static Private Member Functions | |
static real | Dasinh (real x, real y, real hx, real hy) |
static real | Dexp (real x, real y) |
static real | Dhyp (real x, real y, real hx, real hy) |
static real | Dlog1p (real x, real y) |
static real | Dsinh (real x, real y, real sx, real sy, real cx, real cy) |
static real | Dsn (real x, real y, real sx, real sy) |
static real | hyp (real x) |
Private Attributes | |
real | _a |
real | _drhomax |
real | _e2 |
real | _es |
real | _f |
real | _fm |
real | _k0 |
real | _lat0 |
real | _n |
real | _nc |
real | _nrho0 |
real | _psi0 |
real | _scale |
real | _scbet0 |
real | _scchi0 |
real | _sign |
real | _t0nm1 |
real | _tchi0 |
real | ahypover_ |
real | eps_ |
real | epsx_ |
Static Private Attributes | |
static const int | numit_ = 5 |
Lambert conformal conic projection.
Implementation taken from the report,
This is a implementation of the equations in Snyder except that divided differences have been used to transform the expressions into ones which may be evaluated accurately and that Newton's method is used to invert the projection. In this implementation, the projection correctly becomes the Mercator projection or the polar stereographic projection when the standard latitude is the equator or a pole. The accuracy of the projections is about 10 nm (10 nanometers).
The ellipsoid parameters, the standard parallels, and the scale on the standard parallels are set in the constructor. Internally, the case with two standard parallels is converted into a single standard parallel, the latitude of tangency (also the latitude of minimum scale), with a scale specified on this parallel. This latitude is also used as the latitude of origin which is returned by LambertConformalConic::OriginLatitude. The scale on the latitude of origin is given by LambertConformalConic::CentralScale. The case with two distinct standard parallels where one is a pole is singular and is disallowed. The central meridian (which is a trivial shift of the longitude) is specified as the lon0 argument of the LambertConformalConic::Forward and LambertConformalConic::Reverse functions.
This class also returns the meridian convergence gamma and scale k. The meridian convergence is the bearing of grid north (the y axis) measured clockwise from true north.
There is no provision in this class for specifying a false easting or false northing or a different latitude of origin. However these are can be simply included by the calling function. For example the Pennsylvania South state coordinate system (EPSG:3364) is obtained by:
ConicProj is a command-line utility providing access to the functionality of LambertConformalConic and AlbersEqualArea.
Definition at line 63 of file LambertConformalConic.hpp.
|
private |
Definition at line 65 of file LambertConformalConic.hpp.
GeographicLib::LambertConformalConic::LambertConformalConic | ( | real | a, |
real | f, | ||
real | stdlat, | ||
real | k0 | ||
) |
Constructor with a single standard parallel.
[in] | a | equatorial radius of ellipsoid (meters). |
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. |
[in] | stdlat | standard parallel (degrees), the circle of tangency. |
[in] | k0 | scale on the standard parallel. |
GeographicErr | if a, (1 − f) a, or k0 is not positive. |
GeographicErr | if stdlat is not in [−90°, 90°]. |
Definition at line 16 of file src/LambertConformalConic.cpp.
GeographicLib::LambertConformalConic::LambertConformalConic | ( | real | a, |
real | f, | ||
real | stdlat1, | ||
real | stdlat2, | ||
real | k1 | ||
) |
Constructor with two standard parallels.
[in] | a | equatorial radius of ellipsoid (meters). |
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. |
[in] | stdlat1 | first standard parallel (degrees). |
[in] | stdlat2 | second standard parallel (degrees). |
[in] | k1 | scale on the standard parallels. |
GeographicErr | if a, (1 − f) a, or k1 is not positive. |
GeographicErr | if stdlat1 or stdlat2 is not in [−90°, 90°], or if either stdlat1 or stdlat2 is a pole and stdlat1 is not equal stdlat2. |
Definition at line 40 of file src/LambertConformalConic.cpp.
GeographicLib::LambertConformalConic::LambertConformalConic | ( | real | a, |
real | f, | ||
real | sinlat1, | ||
real | coslat1, | ||
real | sinlat2, | ||
real | coslat2, | ||
real | k1 | ||
) |
Constructor with two standard parallels specified by sines and cosines.
[in] | a | equatorial radius of ellipsoid (meters). |
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. |
[in] | sinlat1 | sine of first standard parallel. |
[in] | coslat1 | cosine of first standard parallel. |
[in] | sinlat2 | sine of second standard parallel. |
[in] | coslat2 | cosine of second standard parallel. |
[in] | k1 | scale on the standard parallels. |
GeographicErr | if a, (1 − f) a, or k1 is not positive. |
GeographicErr | if stdlat1 or stdlat2 is not in [−90°, 90°], or if either stdlat1 or stdlat2 is a pole and stdlat1 is not equal stdlat2. |
This allows parallels close to the poles to be specified accurately. This routine computes the latitude of origin and the scale at this latitude. In the case where lat1 and lat2 are different, the errors in this routines are as follows: if dlat = abs(lat2 − lat1) ≤ 160° and max(abs(lat1), abs(lat2)) ≤ 90 − min(0.0002, 2.2 × 10−6(180 − dlat), 6 × 10−8 dlat2) (in degrees), then the error in the latitude of origin is less than 4.5 × 10−14d and the relative error in the scale is less than 7 × 10−15.
Definition at line 68 of file src/LambertConformalConic.cpp.
|
inline |
Definition at line 306 of file LambertConformalConic.hpp.
|
inlinestaticprivate |
Definition at line 125 of file LambertConformalConic.hpp.
Definition at line 133 of file LambertConformalConic.hpp.
Definition at line 105 of file LambertConformalConic.hpp.
|
inlinestaticprivate |
Definition at line 89 of file LambertConformalConic.hpp.
Definition at line 100 of file LambertConformalConic.hpp.
|
inlinestaticprivate |
Definition at line 114 of file LambertConformalConic.hpp.
|
inlinestaticprivate |
Definition at line 93 of file LambertConformalConic.hpp.
|
inline |
Definition at line 291 of file LambertConformalConic.hpp.
|
inline |
LambertConformalConic::Forward without returning the convergence and scale.
Definition at line 262 of file LambertConformalConic.hpp.
void GeographicLib::LambertConformalConic::Forward | ( | real | lon0, |
real | lat, | ||
real | lon, | ||
real & | x, | ||
real & | y, | ||
real & | gamma, | ||
real & | k | ||
) | const |
Forward projection, from geographic to Lambert conformal conic.
[in] | lon0 | central meridian longitude (degrees). |
[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. |
The latitude origin is given by LambertConformalConic::LatitudeOrigin(). No false easting or northing is added and lat should be in the range [−90°, 90°]. The error in the projection is less than about 10 nm (10 nanometers), true distance, and the errors in the meridian convergence and scale are consistent with this. The values of x and y returned for points which project to infinity (i.e., one or both of the poles) will be large but finite.
Definition at line 331 of file src/LambertConformalConic.cpp.
Definition at line 71 of file LambertConformalConic.hpp.
|
private |
Definition at line 102 of file src/LambertConformalConic.cpp.
|
inline |
Definition at line 285 of file LambertConformalConic.hpp.
|
static |
A global instantiation of LambertConformalConic with the WGS84 ellipsoid, stdlat = 0, and k0 = 1. This degenerates to the Mercator projection.
Definition at line 324 of file src/LambertConformalConic.cpp.
|
inline |
This is the latitude of minimum scale and equals the stdlat in the 1-parallel constructor and lies between stdlat1 and stdlat2 in the 2-parallel constructors.
Definition at line 300 of file LambertConformalConic.hpp.
|
inline |
LambertConformalConic::Reverse without returning the convergence and scale.
Definition at line 272 of file LambertConformalConic.hpp.
void GeographicLib::LambertConformalConic::Reverse | ( | real | lon0, |
real | x, | ||
real | y, | ||
real & | lat, | ||
real & | lon, | ||
real & | gamma, | ||
real & | k | ||
) | const |
Reverse projection, from Lambert conformal conic to geographic.
[in] | lon0 | central meridian longitude (degrees). |
[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. |
The latitude origin is given by LambertConformalConic::LatitudeOrigin(). No false easting or northing is added. The value of lon returned is in the range [−180°, 180°]. The error in the projection is less than about 10 nm (10 nanometers), true distance, and the errors in the meridian convergence and scale are consistent with this.
Definition at line 373 of file src/LambertConformalConic.cpp.
Set the scale for the projection.
[in] | lat | (degrees). |
[in] | k | scale at latitude lat (default 1). |
GeographicErr | k is not positive. |
GeographicErr | if lat is not in [−90°, 90°]. |
Definition at line 441 of file src/LambertConformalConic.cpp.
|
private |
Definition at line 67 of file LambertConformalConic.hpp.
|
private |
Definition at line 69 of file LambertConformalConic.hpp.
|
private |
Definition at line 67 of file LambertConformalConic.hpp.
|
private |
Definition at line 67 of file LambertConformalConic.hpp.
|
private |
Definition at line 67 of file LambertConformalConic.hpp.
|
private |
Definition at line 67 of file LambertConformalConic.hpp.
|
private |
Definition at line 68 of file LambertConformalConic.hpp.
|
private |
Definition at line 68 of file LambertConformalConic.hpp.
|
private |
Definition at line 68 of file LambertConformalConic.hpp.
|
private |
Definition at line 68 of file LambertConformalConic.hpp.
|
private |
Definition at line 69 of file LambertConformalConic.hpp.
|
private |
Definition at line 69 of file LambertConformalConic.hpp.
|
private |
Definition at line 68 of file LambertConformalConic.hpp.
|
private |
Definition at line 69 of file LambertConformalConic.hpp.
|
private |
Definition at line 69 of file LambertConformalConic.hpp.
|
private |
Definition at line 68 of file LambertConformalConic.hpp.
|
private |
Definition at line 68 of file LambertConformalConic.hpp.
|
private |
Definition at line 69 of file LambertConformalConic.hpp.
|
private |
Definition at line 66 of file LambertConformalConic.hpp.
|
private |
Definition at line 66 of file LambertConformalConic.hpp.
|
private |
Definition at line 66 of file LambertConformalConic.hpp.
|
staticprivate |
Definition at line 70 of file LambertConformalConic.hpp.