|
CartoType API
|
#include <cartotype_mercator.h>
Public Member Functions | |
| CT_IMPORT | TMercator (const TMercatorParam &aParam) |
| CT_IMPORT TResult | Inverse (const TPoint &aInput, TPoint &aOutput) const |
| CT_IMPORT TResult | Read (TDataInputStream &aInput) |
| CT_IMPORT TResult | Write (TDataOutputStream &aOutput) const |
| CT_IMPORT TCoordinateTransform * | Copy (TResult &aError) const |
Protected Member Functions | |
| CT_IMPORT void | ProjectHelper (const TPoint &aInput, double &aX, double &aY) const |
Protected Attributes | |
| double | iPrimeMeridian |
A plain spherical Mercator projection.
This projection uses floating-point arithmetic and is therefore not suitable for use on platforms with slow floating-point arithmetic.
This class is derived from TCoordinateTransform, not TProjection, to save unnecessary fixed-point arithmetic.
| CT_EXPORT TCoordinateTransform * TMercator::Copy | ( | TResult & | aError | ) | const [virtual] |
Create an exact copy of this object.
Implements CartoType::TCoordinateTransform.
Reimplemented in CartoType::TMillerCylindrical.
Convert Mercator-projection map metres to latitude and longitude. The Mercator projection formula is from http://en.wikipedia.org/wiki/Mercator_projection.
Implements CartoType::TCoordinateTransform.
Reimplemented in CartoType::TMillerCylindrical.
| CT_EXPORT void TMercator::ProjectHelper | ( | const TPoint & | aInput, |
| double & | aX, | ||
| double & | aY | ||
| ) | const [protected, virtual] |
Project points to double-precision floating point pixels without applying the final transform. The Mercator projection formula is from http://en.wikipedia.org/wiki/Mercator_projection. To avoid infinities and excessively large coordinates latitudes are clamped to 85.05113 degrees, giving a square map because the maximum transformed latitude value is pi.
Implements CartoType::TProjectionUsingFloatingPoint.
Reimplemented in CartoType::TMillerCylindrical.
| CT_EXPORT TResult TMercator::Read | ( | TDataInputStream & | aInput | ) | [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.
| CT_EXPORT TResult TMercator::Write | ( | TDataOutputStream & | aOutput | ) | const [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::TCoordinateTransform.
double CartoType::TMercator::iPrimeMeridian [protected] |
The prime meridian of longitude.
1.7.5.1