Public Member Functions | Static Public Member Functions | List of all members
Datum Class Referenceabstract

Position and orientation relative to a WGS84 Datum. More...

#include <BaseGeoCoord.h>

Public Member Functions

bool IsValid () const
 Returns whether the Datum is valid or not. More...
 
int GetError () const
 Gets the error code associated with constructor failure if IsValid is false. More...
 
WCharCP GetErrorMessage (WStringR errorMsg) const
 Gets the error message associated with constructor failure if IsValid is false. More...
 
WCharCP GetName () const
 Gets the name of the Datum. More...
 
StatusInt SetName (WCharCP value)
 Sets the key name of the Datum. More...
 
WCharCP GetDescription () const
 Gets the description of the Datum. More...
 
StatusInt SetDescription (WCharCP value)
 Sets the description of the Datum. More...
 
WCharCP GetSource (WStringR source) const
 Gets the source of the Datum. More...
 
StatusInt SetSource (WCharCP value)
 Sets the source of the Datum. More...
 
WGS84ConvertCode GetConvertToWGS84MethodCode () const
 Gets the method used to convert longitude/latitude from this Datum to the WGS84 datum. More...
 
StatusInt SetConvertToWGS84MethodCode (WGS84ConvertCode value)
 Sets the method used to convert longitude/latitude from this Datum to the WGS84 datum. More...
 
void GetDelta (DPoint3dR delta) const
 Gets the vector from the geocenter of the WGS84 Datum to the geocenter of this Datum. More...
 
StatusInt SetDelta (DPoint3dCR delta)
 Sets the vector from the geocenter of the WGS84 Datum to the geocenter of this Datum. More...
 
void GetRotation (DPoint3dR rotation) const
 Gets the angles from the WGS84 x, y, and z axes to those of this Datum. More...
 
StatusInt SetRotation (DPoint3dCR rotation)
 Sets the angles from the WGS84 x, y, and z axes to those of this Datum. More...
 
double GetScale () const
 Gets the datum transformation scaling in parts per million if known. More...
 
StatusInt SetScale (double scalePPM)
 Sets the datum transformation scaling in parts per million if known. More...
 
int GetEPSGCode () const
 Gets the EPSG code for this Datum, if known. More...
 
WCharCP GetEllipsoidName () const
 Gets the key name of the Ellipsoid used in this Datum. More...
 
int GetEllipsoidCode () const
 Gets the internal index of the Ellipsoid used in this Datum. More...
 
StatusInt SetEllipsoidCode (int ellipsoidCode)
 Gets the internal index of the Ellipsoid used in this Datum. More...
 
WCharCP GetEllipsoidDescription () const
 Gets the description of the Ellipsoid used in this Datum. More...
 
WCharCP GetEllipsoidSource (WStringR ellipsoidSource) const
 Gets the source of the Ellipsoid used in this Datum. More...
 
double GetEllipsoidPolarRadius () const
 Gets the polar radius of the Coordinate System. More...
 
double GetEllipsoidEquatorialRadius () const
 Gets the equatorial radius of the Ellipsoid. More...
 
double GetEllipsoidEccentricity () const
 Gets the eccentricity value for the Ellipsoid. More...
 
EllipsoidCP GetEllipsoid () const
 Gets the Ellipsoid used in this Datum. More...
 
void ParametersValid (bool &deltaValid, bool &rotationValid, bool &scaleValid) const
 Returns whether the delta, rotation, and scale parameters are valid for this Datum. More...
 
void Destroy () const
 Free this Datum. More...
 

Static Public Member Functions

static DatumCP CreateDatum (WCharCP keyName)
 Initializes a new instance of the Datum class. More...
 
static DatumEnumeratorP CreateEnumerator ()
 Factory method to create a DatumEnumerator. More...
 

Detailed Description

Position and orientation relative to a WGS84 Datum.

Member Function Documentation

static DatumCP CreateDatum ( WCharCP  keyName)
static

Initializes a new instance of the Datum class.

Returns
Initialized Datum.
Remarks
If keyName is in the Datum library and valid, the return Datum's IsValid() returns true. Otherwise, the GetError() or GetErrorMessage() methods return the error.
static DatumEnumeratorP CreateEnumerator ( )
static

Factory method to create a DatumEnumerator.

Returns
An initialized DatumEnumerator
void Destroy ( ) const

Free this Datum.

WGS84ConvertCode GetConvertToWGS84MethodCode ( ) const

Gets the method used to convert longitude/latitude from this Datum to the WGS84 datum.

Returns
The convert method.
void GetDelta ( DPoint3dR  delta) const

Gets the vector from the geocenter of the WGS84 Datum to the geocenter of this Datum.

Parameters
deltaOUT The vector from the geocenter of the WGS84 Datum to the geocenter of this Datum.
WCharCP GetDescription ( ) const

Gets the description of the Datum.

Returns
The description of the Datum.
EllipsoidCP GetEllipsoid ( ) const

Gets the Ellipsoid used in this Datum.

Returns
The Ellipsoid of the Datum.
int GetEllipsoidCode ( ) const

Gets the internal index of the Ellipsoid used in this Datum.

Returns
Index of the Coordinate System Ellipsoid.
WCharCP GetEllipsoidDescription ( ) const

Gets the description of the Ellipsoid used in this Datum.

Returns
The description of the Ellipsoid of the Datum.
double GetEllipsoidEccentricity ( ) const

Gets the eccentricity value for the Ellipsoid.

Returns
The eccentricity value for the Ellipsoid.
double GetEllipsoidEquatorialRadius ( ) const

Gets the equatorial radius of the Ellipsoid.

Returns
The equatorial radius of the Ellipsoid.
WCharCP GetEllipsoidName ( ) const

Gets the key name of the Ellipsoid used in this Datum.

Returns
The key name Ellipsoid of the Datum.
double GetEllipsoidPolarRadius ( ) const

Gets the polar radius of the Coordinate System.

Returns
The polar radius of the Ellipsoid.
WCharCP GetEllipsoidSource ( WStringR  ellipsoidSource) const

Gets the source of the Ellipsoid used in this Datum.

Returns
The source of the Ellipsoid of the Datum.
int GetEPSGCode ( ) const

Gets the EPSG code for this Datum, if known.

Returns
The EPSG code.
int GetError ( ) const

Gets the error code associated with constructor failure if IsValid is false.

Returns
The CSMap error code.
See also
GetErrorMessage
WCharCP GetErrorMessage ( WStringR  errorMsg) const

Gets the error message associated with constructor failure if IsValid is false.

Returns
The CSMap error message.
See also
GetError
WCharCP GetName ( ) const

Gets the name of the Datum.

Returns
The name of the Datum.
void GetRotation ( DPoint3dR  rotation) const

Gets the angles from the WGS84 x, y, and z axes to those of this Datum.

Parameters
rotationOUT The rotation angles.
double GetScale ( ) const

Gets the datum transformation scaling in parts per million if known.

Returns
The datum transformation scale in ppm.
WCharCP GetSource ( WStringR  source) const

Gets the source of the Datum.

Returns
The source of the Datum.
bool IsValid ( ) const

Returns whether the Datum is valid or not.

Returns
True if the Datum is valid, False otherwise.
See also
GetError
Remarks
If the datum does not correspond to a datum in the datum library, IsValid is false, and GetError and GetErrorMessage can be used to obtain more details.
void ParametersValid ( bool &  deltaValid,
bool &  rotationValid,
bool &  scaleValid 
) const

Returns whether the delta, rotation, and scale parameters are valid for this Datum.

Parameters
deltaValidOUT Returns true if the datum is valid and its WGS84ConvertCode indicates that the delta parameters are used.
rotationValidOUT Returns true if the datum is valid and its WGS84ConvertCode indicates that the rotation parameters are used.
scaleValidOUT Returns true if the datum is valid and its WGS84ConvertCode indicates that the scale parameter is used.
StatusInt SetConvertToWGS84MethodCode ( WGS84ConvertCode  value)

Sets the method used to convert longitude/latitude from this Datum to the WGS84 datum.

Returns
BSISUCCESS or an error code.
StatusInt SetDelta ( DPoint3dCR  delta)

Sets the vector from the geocenter of the WGS84 Datum to the geocenter of this Datum.

Parameters
deltaIN The vector from the geocenter of the WGS84 Datum to the geocenter of this Datum.
Returns
GEOCOORDERR_ParameterNotUsed if the datum ConvertToWGS84Method does not use the delta settings.
StatusInt SetDescription ( WCharCP  value)

Sets the description of the Datum.

Returns
BSISUCCESS or an error code.
StatusInt SetEllipsoidCode ( int  ellipsoidCode)

Gets the internal index of the Ellipsoid used in this Datum.

Returns
Index of the Coordinate System Ellipsoid.
StatusInt SetName ( WCharCP  value)

Sets the key name of the Datum.

Returns
BSISUCCESS or an error code.
StatusInt SetRotation ( DPoint3dCR  rotation)

Sets the angles from the WGS84 x, y, and z axes to those of this Datum.

Parameters
rotationIN The rotation angles.
Returns
GEOCOORDERR_ParameterNotUsed if the datum ConvertToWGS84Method does not use the rotation settings.
StatusInt SetScale ( double  scalePPM)

Sets the datum transformation scaling in parts per million if known.

Parameters
scalePPMIN The scale in parts per million.
Returns
GEOCOORDERR_ParameterNotUsed if the datum ConvertToWGS84Method does not use the scale setting.
StatusInt SetSource ( WCharCP  value)

Sets the source of the Datum.

Returns
BSISUCCESS or an error code.

The documentation for this class was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.