|
CartoType API
|
#include <cartotype_mercator.h>
Public Member Functions | |
| CT_IMPORT | TTransverseMercator (const TTransverseMercatorParam &aParam) |
| CT_IMPORT TResult | PixelRectToInputRect (const TRect &aPixelRect, TRect &aInputRect) const |
| CT_IMPORT TResult | InputRectToPixelRect (const TRect &aInputRect, TRect &aPixelRect) const |
Protected Member Functions | |
| TResult | CalculateProjection (TPointFixedSmall &aPoint) const |
| TResult | CalculateInverse (TPointFixedSmall &aPoint) const |
| TResult | Read (TDataInputStream &aInput) |
| TResult | Write (TDataOutputStream &aOutput) const |
| TCoordinateTransform * | Copy (TResult &aError) const |
Protected Attributes | |
| TFixedSmall | iScaleFactor |
Transverse mercator projection
| TResult TTransverseMercator::CalculateInverse | ( | TPointFixedSmall & | aPoint | ) | const [protected, virtual] |
Calculate the inverse of the transverse mercator projection. Equations: D = y + phi0; lambda = lambda0 + atan(sinh x / cos D); phi = asin(sin D / cosh x).
Implements CartoType::TProjection.
| TResult TTransverseMercator::CalculateProjection | ( | TPointFixedSmall & | aPoint | ) | const [protected, virtual] |
Calculate the transverse mercator projection. Equations: B = cos(phi) sin (lambda - lambda0); x = atanh(B); y = atan(tan(phi) / cos(lambda - lambda0)) - phi0.
Implements CartoType::TProjection.
| TCoordinateTransform * TTransverseMercator::Copy | ( | TResult & | aError | ) | const [protected, virtual] |
Create an exact copy of this object.
Implements CartoType::TCoordinateTransform.
| CT_EXPORT TResult TTransverseMercator::InputRectToPixelRect | ( | const TRect & | aInputRect, |
| TRect & | aPixelRect | ||
| ) | const [virtual] |
Convert a rectangle in projection input units to the smallest bounding box in pixels. Differentation shows that the projection function has: a local maximum for x if phi is 0, with lambda fixed a local minimum for y if lambda is lambda0, with phi fixed Project the resulting points and update the resulting rectangle.
Reimplemented from CartoType::TCoordinateTransform.
| CT_EXPORT TResult TTransverseMercator::PixelRectToInputRect | ( | const TRect & | aPixelRect, |
| TRect & | aInputRect | ||
| ) | const [virtual] |
Convert a rectangle in pixels to the smallest bounding box in projection input units. Differentation shows that the inverse projection function has: a local minimum for lambda if y+phi0 is 0, with x fixed a local maximum for phi if x is 0, with y fixed with y+phi0 within the -pi/2..pi/2 range Project the resulting points and update the resulting rectangle.
Reimplemented from CartoType::TCoordinateTransform.
| TResult TTransverseMercator::Read | ( | TDataInputStream & | aInput | ) | [protected, virtual] |
A virtual function to read a projection object from serialized data. Derived classes call this base function then read any data of their own.
Reimplemented from CartoType::TCoordinateTransform.
| TResult TTransverseMercator::Write | ( | TDataOutputStream & | aOutput | ) | const [protected, virtual] |
A virtual function to write a projection object as serialized data. Derived classes call this base function then write any data of their own. What is written is not the constructed object but the parameter block needed to create it; in this case TCoordinateTransformParam.
Reimplemented from CartoType::TProjection.
1.7.5.1