Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
IlvEllipsoid Class Reference

This class defines an ellipsoid. More...

#include <ilviews/maps/projection/ellips.h>

Public Member Functions

 IlvEllipsoid (IlDouble radius, IlDouble eccentricity=0.0, const char *name=0, const char *comment=0)
 Constructs an IlvEllipsoid giving radius and eccentricity. More...
 
IlvEllipsoidcopy () const
 Returns a copy of the ellipsoid. More...
 
IlvEllipsoidcreateASphere () const
 Returns a sphere whose radius is the arithmetic mean of the principle radii at the specified latitude. More...
 
IlvEllipsoidcreateASphere (IlDouble phi) const
 Returns a sphere whose radius is the arithmetic mean of the principle radii at the specified latitude (expressed in radian). More...
 
IlvEllipsoidcreateGSphere () const
 Returns a sphere whose radius is the geometric mean of the minor and major axes. More...
 
IlvEllipsoidcreateGSphere (IlDouble phi) const
 Returns a sphere whose radius is the geometric mean of the principle radii at the specified latitude (expressed in radian). More...
 
IlvEllipsoidcreateHSphere () const
 Returns a sphere whose radius is the harmonic mean of the minor and major axes. More...
 
IlvEllipsoidcreateSphereOfSameArea () const
 Returns a sphere whose area is equal to that of the ellipsoid. More...
 
IlvEllipsoidcreateSphereOfSameVolume () const
 Returns a sphere whose volume is equal to that of the ellipsoid. More...
 
IlBoolean equivalent (const IlvEllipsoid *e) const
 Returns whether this ellipsoid is equivalent to the specified ellipsoid. More...
 
IlDouble getA () const
 Returns the semi-major axis of the ellipsoid in meters. More...
 
IlDouble getB () const
 Returns the semi-minor axis of the ellipsoid in meters. More...
 
const char * getComment () const
 Returns a description of the ellipsoid, if available, or a null pointer otherwise. More...
 
IlvMapsError getError () const
 Gets the error status of the ellipsoid. More...
 
IlDouble getES () const
 Returns the eccentricity squared of the ellipsoid. More...
 
const char * getName () const
 Returns the name of the ellipsoid, if available, or a null pointer otherwise. More...
 
IlBoolean isBad () const
 Checks the status of the ellipsoid. More...
 
IlBoolean isSphere () const
 Checks if the ellipsoid is a sphere. More...
 
void save (IlvOutputFile &outputFile) const
 Saves an IlvEllipsoid object to an .ilv file. More...
 

Static Public Member Functions

static IlvMapsError ALessThanZero ()
 Returned if an ellipsoid has been initialized with a negative semi-major axis. More...
 
static const IlvEllipsoidCPM ()
 Returns the ellipsoid specified by the French Weights and Measures Commission ("Commission des Poids et Mesures") in 1799. More...
 
static IlDouble ESFromFlattening (IlDouble f)
 Returns the eccentricity squared, computed from the flattening of the ellipsoid. More...
 
static IlDouble ESFromPolarRadius (IlDouble a, IlDouble b)
 Returns the eccentricity squared, computed from the semi-major axis and the semi-minor axis of the ellipsoid. More...
 
static IlvMapsError ESGreaterThanOne ()
 Returned if an ellipsoid has been initialized with an eccentricity squared greater than one. More...
 
static IlvMapsError ESLessThanZero ()
 Returned if an ellipsoid has been initialized with a negative eccentricity squared. More...
 
static const IlvEllipsoidGetRegisteredEllipsoid (const char *name)
 This static member function returns the registered ellipsoid whose name is passed as argument. More...
 
static const IlvEllipsoid *const * GetRegisteredEllipsoids (IlUInt &count)
 Returns the array of registered ellipsoids. More...
 
static IlvEllipsoidLoad (IlvInputFile &, IlvMapsError *=0)
 Loads an IlvEllipsoid object to a .ilv file. More...
 
static const IlvEllipsoidSGS85 ()
 Returns the ellipsoid used in the Soviet Geodetic System 85. More...
 
static const IlvEllipsoidSPHERE ()
 Returns a spherical ellipsoid representing the earth. More...
 
static const IlvEllipsoidWGS60 ()
 Returns the WGS 60 ellipsoid. More...
 
static const IlvEllipsoidWGS66 ()
 Returns the WGS 66 ellipsoid. More...
 
static const IlvEllipsoidWGS72 ()
 Returns the WGS 72 ellipsoid. More...
 
static const IlvEllipsoidWGS84 ()
 Returns the WGS 84 ellipsoid. More...
 

Detailed Description

This class defines an ellipsoid.

Ellipsoids are used in map projections to represent the shape of the earth. For many applications, and especially in small-scale mapping, the earth can be represented as a sphere. However, because the earth rotates on its axis and is slightly flattened, it is better approximated by an ellipsoid of rotation around the polar axis. Ellipsoidal forms of the projections are used for accurate large-scale maps and plane coordinate systems. Library: ilvmaps

See also
IlvProjection.

Constructor & Destructor Documentation

§ IlvEllipsoid()

IlvEllipsoid::IlvEllipsoid ( IlDouble  radius,
IlDouble  eccentricity = 0.0,
const char *  name = 0,
const char *  comment = 0 
)

Constructs an IlvEllipsoid giving radius and eccentricity.

This constructor initializes a named ellipsoid with the specified equatorial radius expressed in meters and its eccentricity squared. The parameter comment lets you add a description of the ellipsoid.

Parameters
radiusThe equatorial radius.
eccentricityThe squared eccentricity.
nameAn optional name for the ellipsoid.
commentAn optional comment.

Member Function Documentation

§ ALessThanZero()

static IlvMapsError IlvEllipsoid::ALessThanZero ( )
static

Returned if an ellipsoid has been initialized with a negative semi-major axis.

Returns
The corresponding error code.

§ copy()

IlvEllipsoid* IlvEllipsoid::copy ( ) const

Returns a copy of the ellipsoid.

Returns
The copied ellipsoid.

§ CPM()

static const IlvEllipsoid* IlvEllipsoid::CPM ( )
static

Returns the ellipsoid specified by the French Weights and Measures Commission ("Commission des Poids et Mesures") in 1799.

Returns
The ellipsoid specified by the French Weights and Measures Commission.

§ createASphere() [1/2]

IlvEllipsoid* IlvEllipsoid::createASphere ( ) const

Returns a sphere whose radius is the arithmetic mean of the principle radii at the specified latitude.

Returns
The corresponding sphere.

§ createASphere() [2/2]

IlvEllipsoid* IlvEllipsoid::createASphere ( IlDouble  phi) const

Returns a sphere whose radius is the arithmetic mean of the principle radii at the specified latitude (expressed in radian).

Returns
The corresponding sphere.

§ createGSphere() [1/2]

IlvEllipsoid* IlvEllipsoid::createGSphere ( ) const

Returns a sphere whose radius is the geometric mean of the minor and major axes.

Returns
The corresponding sphere.

§ createGSphere() [2/2]

IlvEllipsoid* IlvEllipsoid::createGSphere ( IlDouble  phi) const

Returns a sphere whose radius is the geometric mean of the principle radii at the specified latitude (expressed in radian).

Returns
The corresponding sphere.

§ createHSphere()

IlvEllipsoid* IlvEllipsoid::createHSphere ( ) const

Returns a sphere whose radius is the harmonic mean of the minor and major axes.

Returns
The corresponding sphere.

§ createSphereOfSameArea()

IlvEllipsoid* IlvEllipsoid::createSphereOfSameArea ( ) const

Returns a sphere whose area is equal to that of the ellipsoid.

Returns
The corresponding sphere.

§ createSphereOfSameVolume()

IlvEllipsoid* IlvEllipsoid::createSphereOfSameVolume ( ) const

Returns a sphere whose volume is equal to that of the ellipsoid.

Returns
The corresponding sphere.

§ equivalent()

IlBoolean IlvEllipsoid::equivalent ( const IlvEllipsoid e) const

Returns whether this ellipsoid is equivalent to the specified ellipsoid.

Returns
IlTrue if the specified ellipsoid e is equivalent to this ellipsoid.

§ ESFromFlattening()

static IlDouble IlvEllipsoid::ESFromFlattening ( IlDouble  f)
static

Returns the eccentricity squared, computed from the flattening of the ellipsoid.

Parameters
fThe flattening.
Returns
The eccentricity squared.

§ ESFromPolarRadius()

static IlDouble IlvEllipsoid::ESFromPolarRadius ( IlDouble  a,
IlDouble  b 
)
static

Returns the eccentricity squared, computed from the semi-major axis and the semi-minor axis of the ellipsoid.

Parameters
aThe semi-major axis of the ellipsoid or equatorial radius.
bThe semi-minor axis of the ellipsoid or polar radius.
Returns
The eccentricity squared.

§ ESGreaterThanOne()

static IlvMapsError IlvEllipsoid::ESGreaterThanOne ( )
static

Returned if an ellipsoid has been initialized with an eccentricity squared greater than one.

Returns
The corresponding error code.

§ ESLessThanZero()

static IlvMapsError IlvEllipsoid::ESLessThanZero ( )
static

Returned if an ellipsoid has been initialized with a negative eccentricity squared.

Returns
The corresponding error code.

§ getA()

IlDouble IlvEllipsoid::getA ( ) const

Returns the semi-major axis of the ellipsoid in meters.

It is also known as the equatorial radius of the ellipsoid.

Returns
The semi-major axis of the ellipsoid in meters.

§ getB()

IlDouble IlvEllipsoid::getB ( ) const

Returns the semi-minor axis of the ellipsoid in meters.

It is also known as the polar radius of the ellipsoid.

§ getComment()

const char* IlvEllipsoid::getComment ( ) const

Returns a description of the ellipsoid, if available, or a null pointer otherwise.

This string cannot be modified or deleted.

Returns
The description of the ellipsoid.

§ getError()

IlvMapsError IlvEllipsoid::getError ( ) const

Gets the error status of the ellipsoid.

This member function returns the status of an ellipsoid, namely:

  • IlvMaps::NoError() if the ellipsoid is valid.
  • An error code if the ellipsoid is invalid, for example, because of wrong parameters.

See the class IlvMaps to know how to interpret the error codes returned.

Returns
An error indicating wrong ellipsoid parameters.
See also
IlvMaps.

§ getES()

IlDouble IlvEllipsoid::getES ( ) const

Returns the eccentricity squared of the ellipsoid.

Returns
The eccentricity squared of the ellipsoid.

§ getName()

const char* IlvEllipsoid::getName ( ) const

Returns the name of the ellipsoid, if available, or a null pointer otherwise.

This string cannot be modified or deleted.

Returns
The name of the ellipsoid.

§ GetRegisteredEllipsoid()

static const IlvEllipsoid* IlvEllipsoid::GetRegisteredEllipsoid ( const char *  name)
static

This static member function returns the registered ellipsoid whose name is passed as argument.

About 40 common ellipsoids are registered in the class. This function returns null if the ellipsoid is of an unknown type.

Parameters
nameThe name of the ellipsoid to be retrieved.
Returns
The ellipsoid if the name is known, or a null pointer otherwise.

§ GetRegisteredEllipsoids()

static const IlvEllipsoid* const* IlvEllipsoid::GetRegisteredEllipsoids ( IlUInt count)
static

Returns the array of registered ellipsoids.

The count argument is set to the number of ellipsoids. About 40 common ellipsoids are registered in the class.

Parameters
countThe returned number of ellipsoids.
Returns
The array of registered ellipsoids.

§ isBad()

IlBoolean IlvEllipsoid::isBad ( ) const

Checks the status of the ellipsoid.

This member function returns IlTrue if the ellipsoid is in an invalid status, for example if the value of the eccentricity squared is less than zero. See the function getError below.

Returns
IlTrue if the ellipsoid is invalid, IlFalse otherwise.

§ isSphere()

IlBoolean IlvEllipsoid::isSphere ( ) const

Checks if the ellipsoid is a sphere.

This member function returns IlTrue if the ellipsoid is a sphere.

Returns
IlTrue if the ellipsoid is a sphere, IlFalse otherwise.

§ Load()

static IlvEllipsoid* IlvEllipsoid::Load ( IlvInputFile ,
IlvMapsError *  = 0 
)
static

Loads an IlvEllipsoid object to a .ilv file.

It can be used, for example, within the read method of a subclass of IlvNamedProperty.
It returns a null pointer if an error occurred while reading. If the read operation succeeds, the developer is responsible for deleting the ellipsoid.

Returns
The read ellipsoid.

§ save()

void IlvEllipsoid::save ( IlvOutputFile outputFile) const

Saves an IlvEllipsoid object to an .ilv file.

It can be used, for example, within the write method of a subclass of IlvNamedProperty.

Parameters
outputFileThe IlvOutputFile output file.

§ SGS85()

static const IlvEllipsoid* IlvEllipsoid::SGS85 ( )
static

Returns the ellipsoid used in the Soviet Geodetic System 85.

Returns
The ellipsoid used in the Soviet Geodetic System 85.

§ SPHERE()

static const IlvEllipsoid* IlvEllipsoid::SPHERE ( )
static

Returns a spherical ellipsoid representing the earth.

Returns
A spherical ellipsoid representing the earth.

§ WGS60()

static const IlvEllipsoid* IlvEllipsoid::WGS60 ( )
static

Returns the WGS 60 ellipsoid.

Returns
The WGS 60 ellipsoid.

§ WGS66()

static const IlvEllipsoid* IlvEllipsoid::WGS66 ( )
static

Returns the WGS 66 ellipsoid.

Returns
The WGS 66 ellipsoid.

§ WGS72()

static const IlvEllipsoid* IlvEllipsoid::WGS72 ( )
static

Returns the WGS 72 ellipsoid.

Returns
The WGS 72 ellipsoid.

§ WGS84()

static const IlvEllipsoid* IlvEllipsoid::WGS84 ( )
static

Returns the WGS 84 ellipsoid.

Returns
The WGS 84 ellipsoid.

© Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.