AGI STK Graphics 11 Send comments on this topic.
WindowToCartographic Method (IAgStkGraphicsCamera)
See Also  Example
CentralBody
The Central Body of the position.
Position
An array containing the pixel coordinate (in the order x, y) to convert.





Description

Converts a pixel coordinate relative to the globe control to a Cartographic position. For speed, terrain is not considered; if the pixel coordinate does not intersect the ellipsoid, an exception is thrown. Returns the Cartographic position. The array contains the elements of the position in the order latitude, longitude, altitude.

Syntax

[Visual Basic .NET]
Public Function WindowToCartographic( _
   ByVal CentralBody As String, _
   ByRef Position As System.Array _
) As System.Array

[C#]
public System.Array WindowToCartographic(
string CentralBody,
ref System.Array Position
);

[Managed C++]
public: System::Array WindowToCartographic(
String __gc ^ CentralBody,
System::Array ^^ Position
);

[Java]
public Object[] windowToCartographic(
String CentralBody,
Object[] Position
);

[Unmanaged C++]
public: HRESULT WindowToCartographic(
BSTR CentralBody,
SAFEARRAY ** Position,
SAFEARRAY ** Array
);

Parameters

CentralBody
The Central Body of the position.
Position
An array containing the pixel coordinate (in the order x, y) to convert.

Example

Shows the format of the Position parameter when converting a pixel coordinate to a cartographic position.
[C#] Copy Code
Array position = new object[] 

    150
    116 
}; 
 
Array cartographicPos = scene.Camera.WindowToCartographic( 
    "Earth"
    ref position); 
 

Shows the format of the Position parameter when converting a pixel coordinate to a cartographic position.
[Visual Basic .NET] Copy Code
Dim position As Array = New Object() {150, 116}

Dim cartographicPos As Array = scene.Camera.WindowToCartographic("Earth", position)

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1