rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvEllipsoid Class Reference

This class defines an ellipsoid. More...

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

List of all members.

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

Static Public Member Functions

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

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 ( 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:
radius The equatorial radius.
eccentricity The squared eccentricity.
name An optional name for the ellipsoid.
comment An optional comment.

Member Function Documentation

static IlvMapsError IlvEllipsoid::ALessThanZero (  )  [static]

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

Returns:
The corresponding error code.
IlvEllipsoid* IlvEllipsoid::copy (  )  const

Returns a copy of the ellipsoid.

Returns:
The copied ellipsoid.
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.
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.
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.
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.
IlvEllipsoid* IlvEllipsoid::createGSphere (  )  const

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

Returns:
The corresponding sphere.
IlvEllipsoid* IlvEllipsoid::createHSphere (  )  const

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

Returns:
The corresponding sphere.
IlvEllipsoid* IlvEllipsoid::createSphereOfSameArea (  )  const

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

Returns:
The corresponding sphere.
IlvEllipsoid* IlvEllipsoid::createSphereOfSameVolume (  )  const

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

Returns:
The corresponding sphere.
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.
static IlDouble IlvEllipsoid::ESFromFlattening ( IlDouble  f  )  [static]

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

Parameters:
f The flattening.
Returns:
The eccentricity squared.
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:
a The semi-major axis of the ellipsoid or equatorial radius.
b The semi-minor axis of the ellipsoid or polar radius.
Returns:
The eccentricity squared.
static IlvMapsError IlvEllipsoid::ESGreaterThanOne (  )  [static]

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

Returns:
The corresponding error code.
static IlvMapsError IlvEllipsoid::ESLessThanZero (  )  [static]

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

Returns:
The corresponding error code.
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.
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.

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.
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.
IlDouble IlvEllipsoid::getES (  )  const

Returns the eccentricity squared of the ellipsoid.

Returns:
The eccentricity squared of the ellipsoid.
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.
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:
name The name of the ellipsoid to be retrieved.
Returns:
The ellipsoid if the name is known, or a null pointer otherwise.
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:
count The returned number of ellipsoids.
Returns:
The array of registered ellipsoids.
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.
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.
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.
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:
outputFile The IlvOutputFile output file.
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.
static const IlvEllipsoid* IlvEllipsoid::SPHERE (  )  [static]

Returns a spherical ellipsoid representing the earth.

Returns:
A spherical ellipsoid representing the earth.
static const IlvEllipsoid* IlvEllipsoid::WGS60 (  )  [static]

Returns the WGS 60 ellipsoid.

Returns:
The WGS 60 ellipsoid.
static const IlvEllipsoid* IlvEllipsoid::WGS66 (  )  [static]

Returns the WGS 66 ellipsoid.

Returns:
The WGS 66 ellipsoid.
static const IlvEllipsoid* IlvEllipsoid::WGS72 (  )  [static]

Returns the WGS 72 ellipsoid.

Returns:
The WGS 72 ellipsoid.
static const IlvEllipsoid* IlvEllipsoid::WGS84 (  )  [static]

Returns the WGS 84 ellipsoid.

Returns:
The WGS 84 ellipsoid.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.