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)
 Initializes a new IlvEllipsoid instance, specifying giving the 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 a specified latitude. 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 a specified latitude. 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. More...
 
IlDouble getB () const
 Returns the semi-minor axis of the ellipsoid. More...
 
const char * getComment () const
 Returns a description of the ellipsoid. 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. 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. 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)
 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. 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.

Library: ilvmaps
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.

See also
IlvProjection.

Constructor & Destructor Documentation

§ IlvEllipsoid()

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

Initializes a new IlvEllipsoid instance, specifying giving the radius and eccentricity.

The ellipsoid is initialized 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 a specified latitude.

Parameters
phiThe 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 a specified latitude.

Parameters
phiThe 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.

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.

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

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

§ getComment()

const char* IlvEllipsoid::getComment ( ) const

Returns a description of the ellipsoid.

Returns
The description of the ellipsoid, or a 0 if it has none. This string cannot be modified or deleted.

§ 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.

Returns
The name of the ellipsoid, or a 0 if it has none. This string cannot be modified or deleted.

§ GetRegisteredEllipsoid()

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

Returns the registered ellipsoid whose name is passed as argument.

About 40 common ellipsoids are registered in the class. This function returns 0 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 0 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.

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

It returns 0 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.

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

Parameters
outputFileThe 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 2018, 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.