GetGroundHeight

The GetGroundHeight method retrieves the height of a given coordinate on the terrain using the given accuracy level.

 

HRESULT GetGroundHeight(

[in] double X,

[in] double Y,

[in] AccuracyLevel Level,

[out, retval] double* TerrainHeight)

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.

Remarks:

The retrieved TerrainHeight is based on the information that was written in the MPT. This means that if the MPT was not built with correct height information, this method will also not work properly.