ConvertToMGRS

This method converts a given coordinate from the coordinate system of the terrain database to Military Grid Reference System coordinates. If you called SetSourceCS() to change the client application coordinate system, the coordinates given should be in the set coordinate system.
The X and Y coordinates to be converted should be given in CoordX andCoordY respectively. After the method is completed, bstrMGRS returns the converted coordinates as a string value.

Implemented only in ICoordSys2.

 

HRESULT ConvertToMGRS(

 [in] double CoordX,

 [in] double CoordY,

 [out, retval] BSTR* bstrMGRS)

Parameters:

Return Values:

The return value obtained from the returned HRESULT can be one of the following:

 

Return value

Meaning

S_OK

Success.

TE_E_INTERNAL

TerraExplorer internal error.

TE_E_COORDSYS_NOT_INIT

Reprojection error.

The key component geocalc.dat may be missing