Reproject

This method converts a given coordinate from one coordinate system to another.
The X and Y coordinates to be converted should be given in doubleCoordX anddoubleCoordY respectively. After the method is completed, the doubleCoordX and doubleCoordY returns the converted coordinates. A handle to a coordinate system can be obtained using ICoordSys::GetCSHandle().

 

HRESULT Reproject(

 [in] long FromCSHandle,

 [in] long ToCSHandle,

 [in, out] VARIANT* doubleCoordX,

 [in, out] VARIANT* doubleCoordY)

Parameters:

Return Values:

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

 

Return value

Meaning

S_OK

Success.

E_FAIL

Catastrophic failure.

TE_E_MPTNOTLOADED

An MPT file must be loaded in TerraExplorer for this method to work.

TE_E_COORDSYS_NOT_INIT

Reprojection error.

The key component geocalc.dat may be missing

TE_E_NOLICENSE

You are running TerraExplorer Viewer and therefore do not have permission to work with this interface.