CreateImageryLayer

CreateImageryLayer creates an imagery layer in the 3D window. Adding the image uses a set of plugins that support multiple file formats. The coordinates of the source can be passed via the UpperLeftX/Y and LowerRightX/Y parameters. If all four coordinate field values are zero, the coordinate information, if available, is read from the file. If the source file coordinate system is not the same as the MPT file Terrain Coordinate system, you can reproject it using the ITerrainRasterLayer::SetLayerCS() method.

 

HRESULT CreateImageryLayer(

[in] BSTR ImageryFileName,

[in] double UpperLeftX,

[in] double UpperLeftY,

[in] double LowerRightX,

[in] double LowerRightY,

[in, optional, defaultvalue(0)] VARIANT InitParam,

[in, optional, defaultvalue("")] VARIANT PlugName,

[in, optional, defaultvalue(0)] long GroupID,

[in, optional, defaultvalue("")] BSTR Description,

[out, retval] ITerrainRasterLayer** pITerrainRasterLayer5)

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_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the information tree.

TE_E_INTERNAL

TerraExplorer was unable to create the object. To get more information about this error use IErrorInfo Interface.

TE_E_NOLICENCE

Your license does not allow the use of this feature.