GetGroundHeightEx

The GetGroundHeightEx method retrieves Information about a given coordinate on the terrain, using the given accuracy level. If there is an object, derived from ITerrainObject5 with the ITerrainObject5::GroundObject property set to TRUE, at the selected coordinate and the IncludeGroundObject parameter is set to TRUE, the method returns the ObjectID of the object, and its height at the coordinate.

Implemented only in ITerrain3.

 

HRESULT GetGroundHeightEx(

 [in] double X,

 [in] double Y,

 [in] AccuracyLevel Level,

 [in] bool IncludeGroundObject,

 [out] VARIANT* bstrObjectID,

 [out] VARIANT* doubleTerrainHeight)

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.