This method returns the metric conversion factor for the
specified unit.
A handle can be obtained using ICoordSys::GetCSHandle()
HRESULT GetUnitFactor(
[in] long CSHandle,
[out] VARIANT* doubleToMeter)
Parameters:
CSHandle – Handle to the coordinate system with the relevant unit.
doubleToMeter – Returns the metric conversion factor.
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_COORDSYS_NOT_INIT |
Reprojection error. The key component geocalc.dat may be missing |
TE_E_COORDSYS_UNIT_FACTOR |
Error getting linear unit factor. |