Defining New Ellipsoids
Ellipsoids provided in the package are defined by two parameters:
The equatorial radius or semi-major axis of the ellipsoid.
The eccentricity squared of the ellipsoid.
If the eccentricity squared is null, the ellipsoid is a sphere.
Defining a Spherical Ellipsoid
If only one parameter is provided, the ellipsoid is assumed to be a sphere. The following example defines a sphere with a radius of 10 meters.
IlvEllipsoid ellipsoid = new IlvEllipsoid(10.0);
Most of the mapping applications use the ellipsoid
SPHERE() that defines a sphere having the dimensions very close to those of the Earth. Generally, the selected ellipsoid should be as close as possible to the actual shape of the Earth as far as the region to be represented is concerned. The radius of the sphere is expressed in meters.
The following example defines an ellipsoid with an equatorial radius of 10 meters and an eccentricity squared of 0.0067:
IlvEllipsoid* ellipsoid = new IlvEllipsoid(10, 0.0067);
If you prefer to provide some other parameter than the eccentricity squared, you can use the conversion methods provided by the
IlvEllipsoid class.
The following example defines an ellipsoid with an equatorial radius of 10 meters and a polar radius of 9 meters:
IlvEllipsoid* ellipsoid = new IlvEllipsoid(10,IlvEllipsoid::ESFromPolarRadius(10.0,9.0)); |
The polar radius provided is converted to an eccentricity squared value with the ESFromPolarRadius method.
The class
IlvEllipsoid provides the following conversion methods for polar radius and flattening:
Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.