If only one parameter is provided, the ellipsoid is assumed
to be a sphere. The following example defines a sphere with a radius
of 6 000 kilometers (6000000 meters).
IlvEllipsoid ellipsoid = new IlvEllipsoid(6000000D);
Most of the mapping applications use the ellipsoid IlvEllipsoid.SPHERE
that
defines a sphere having 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 6000 kilometers and an eccentricity squared of 0.0067:
IlvEllipsoid ellipsoid = new IlvEllipsoid(6000000D,0.0067D);
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 6000 kilometers and a polar radius of 5900 kilometers:
IlvEllipsoid ellipsoid = new IlvEllipsoid(6000000D,
IlvEllipsoid.ESFromPolarRadius(6000000D, 5900000D));
The polar radius is converted to an eccentricity squared
value with the ESFromPolarRadius()
method.
The class IlvEllipsoid
provides
the following conversion methods for polar radius and flattening: