The SetLayerCS() method sets the coordinate system of the imagery layer. If the coordinate system and the terrain coordinate system are different, the image is reprojected to the terrain coordinate system. See: ICoordSys3::GetTerrainCS() and ICoordSys3::SetTerrainCS() methods for further details.
HRESULT SetLayerCS(
[in] BSTR GroupKey,
[in] BSTR SystemKey,
[in] BSTR DatumKey,
[in] BSTR UnitKey,
[in, optional, defaultvalue(-1)] long EPSG)
Parameters:
GroupKey – The unique string of the coordinate system group.
SystemKey – The unique string of the coordinate system.
DatumKey – The unique string of the coordinate system datum.
UnitKey – The unique string of the coordinate system units.
EPSG – Reserved.
Return Values:
The return value obtained from the returned HRESULT is one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_TEOBJECT_NOLONGEREXIST |
The object you are trying to access no longer exists. This may have occurred because, while keeping an interface to the object, the user deleted it from TerraExplorer (via the TE user interface). Without the object, the interface cannot be used. Therefore, you should release the interface. |
TE_E_INTERNAL |
TerraExplorer was unable to create the object. To get more information about this error use the IErrorInfo Interface. |