Maps > Map Projections > Ellipsoids > Associating an Ellipsoid with a Projection
 
Associating an Ellipsoid with a Projection
Each projection is associated with an ellipsoid. By default, most of the projections use the ellipsoid IlvEllipsoid::SPHERE. Only some specific projections, such as the Universal Transverse Mercator or the Universal Polar Stereographic, use a nonspherical ellipsoid by default.
You will obtain more accurate projections using an appropriate ellipsoid, especially as far as large scale maps are concerned. Note, however, that computations will be more complex and slower than when using a sphere.
To specify the ellipsoid you want to use for a projection, use the method IlvProjection::setEllipsoid.
IlvProjection* projection = new IlvMercatorProjection();
projection->setEllipsoid(*IlvEllipsoid::WGS84());
You can either use a static member of the class IlvEllipsoid, which defines a number of commonly used ellipsoids, use the static method GetRegisteredEllipsoid() to retrieve a registered Ellipsoid, or create your own ellipsoid as explained in the section Defining New Ellipsoids. You can also use one of the predefined ellipsoids listed in the section Predefined Ellipsoids.

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.