ISGWorld
ISGWorld in the main entry point to most TerraExplorer interfaces. Through this interface you can manage your application and 3D content and handle events. Listed below are ISGWorld's properties and methods. See ISGWorld Events for information on ISGWorld's events.
See the "Overview" chapter for an introduction to TerraExplorer API, including the main issues addressed by the API and examples of the client applications that can be developed using the API.
|
Properties |
|
|
Provides a set of methods for analyzing the terrain. |
|
|
Controls various application level settings. |
|
|
Gives access to standard TerraExplorer menu commands. |
|
|
Provides a set of methods for reprojecting given coordinates between different coordinate systems. |
|
|
Composed of many methods that create different objects. |
|
|
Provides you with date and time related features. |
|
|
Provides methods for interactive user drawing capabilities. |
|
|
Gets and sets a Boolean that determines whether the containing application executes all keyboard acceleration commands or TerraExplorer executes them. |
|
|
Gives you control of the camera in terms of positioning, orientation, and speed. |
|
|
Gives access to project settings and to basic methods for opening and saving the project. |
|
|
Allows you to manipulate the Project Tree items, including management of groups, items and layers. |
|
|
Provides the methods for connecting, disconnecting and checking the currently connected SkylineGlobe Server. |
|
|
An ITerrain representing information about the terrain, such as the MPT file name that is being used, and information about the MPT coordinate system. |
|
|
Gets information about the version of TerraExplorer that is running. |
|
|
A wrapper for all the functionality that represents interaction with the 3D Window, such as snapshots, dimensions and query pixel information. |
|
|
Methods |
|
|
Binds the specified function to an event, so that the function gets called whenever the event occurs. |
|
|
Creates an SGWorld instance. |
|
|
Unbinds a function that was bound to an event using the AttachEvent method. |
|
|
Returns the value of a specified parameter in the TerraExplorer options. |
|
|
GetParam |
Reserved. Currently not used. |
|
Opens a specified project. |
|
|
Sets the value of a specified parameter in the TerraExplorer options. |
|
|
SetParam |
Reserved. Currently not used. |
|
SetParamEx |
Reserved. Currently not used. |
IgnoreAccelerators
Gets and sets a Boolean that determines whether the containing application executes all keyboard acceleration commands or TerraExplorer executes them. If this Boolean is set to TRUE, the containing application executes all keyboard acceleration commands. If it is set to FALSE, TerraExplorer executes them.
JavaScript |
|
IgnoreAccelerators |
C# |
|
bool IgnoreAccelerators { get; set; } |
C++ |
|
HRESULT IgnoreAccelerators([out, retval] VARIANT_BOOL* pVal) HRESULT IgnoreAccelerators([in] VARIANT_BOOL pVal) |
AttachEvent
Binds the specified function to an event, so that the function gets called whenever the event occurs.
JavaScript |
|
AttachEvent( bstrEventName, dispFunc) |
C# |
|
void AttachEvent( string bstrEventName, object dispFunc) |
C++ |
|
HRESULT AttachEvent( BSTR bstrEventName, VARIANT dispFunc) |
Parameters
bstrEventName
A string representing the event name.
dispFunc
The function that should be called when the event occurs or a delegate to the function in C#.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
CreateInstance
This method is used to create an SGWorld instance from either the latest or a specific version. This is used primarily when working with scripting languages to incorporate TerraExplorer COM capabilities into a webpage. See "Working with Scripting Languages" for more information.
JavaScript |
|
CreateInstance( clsid) |
C# |
|
dynamic CreateInstance( string clsid) |
C++ |
|
HRESULT CreateInstance( BSTR clsid, IUnknown** ppUnk) |
Parameters
clsid
CLSID of the desired object (e.g. “{3A4F91A1-65A8-11D5-85C1-0001023952C1}”).
Return Value
ppUnk
A pointer to the newly created object after the call returns successfully.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
DetachEvent
Functions that were bound to an event using the AttachEvent method must be unbound from the event, to stop receiving notifications when the event occurs.
JavaScript |
|
DetachEvent( bstrEventName, dispFunc) |
C# |
|
void DetachEvent( string bstrEventName, object dispFunc) |
C++ |
|
HRESULT DetachEvent( BSTR bstrEventName, VARIANT dispFunc) |
Parameters
bstrEventName
A string representing the event name.
dispFunc
The function that was attached to the event.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
GetOptionParam
Returns the value of a specified parameter in the TerraExplorer options. Each parameter is accessed by a unique identification string. See “SetOptionParam” for a list of the supported parameter string values and the respective parameter value options.
JavaScript |
|
GetOptionParam( paramName) |
C# |
|
dynamic GetOptionParam( string paramName) |
C++ |
|
HRESULT GetOptionParam( BSTR paramName, VARIANT pVal) |
Parameters
paramName
The name of the parameter whose value is being returned.
Return Value
pVal
The parameter value.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
Open
Opens a specified project.
JavaScript |
|
Open( ProjectURL) |
C# |
|
void Open( string ProjectURL) |
C++ |
|
HRESULT Open( BSTR ProjectURL) |
Parameters
ProjectURL
A full path name or a URL to the project file.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
SetOptionParam
Allows defining the value of a specified parameter in the TerraExplorer options. Each parameter is accessed by a unique identification string. Changes are applied to the currently open FLY project, but are not saved when the project or TerraExplorer is closed. These changes reflect in the 3D Window, but not in the TerraExplorer’s options dialog box.
The following table describes the supported parameter string values and the respective parameter value options:
paramName |
Type |
paramVal/pVal |
General |
||
“TerrainCacheSize” |
[in, out] int |
The size of the terrain cache. |
“ModelsCacheSize” |
[in, out] int |
The size of the models’ cache. |
“DefaultTerrainDatabase” |
[in, out] BSTR |
The default terrain database to use when directly opening a KML or KMZ file. Only Fly, KML, KMZ, MPT, and TBP files can be used. |
“SGServicesURL” |
[out] BSTR |
The URL of the SkylineGlobe Server JSON file configuring the search provider and available OSM layers. The default path is: http://www.skylinesoft.com/SG/SGServices.json |
“PyramidImageFormat” |
[in, out] int |
Select the image pyramid format. Use any of the following values: § -1 = None § 1 = MPT JPEG v3 § 4 = MPT PNG 24 § 6 = Uncompressed |
“PyramidElevationFormat” |
[in, out] int |
Select the elevation pyramid format. Use any of the following values: § -1 = None § 101 = MPT JPEG v3 § 6 = Uncompressed MPU § 105 = MPT PNG 16.8 |
“SuggestPyramidCreation” |
[in, out] int |
Determines whether an Open Create Resolution Pyramid dialog box is displayed when loading raster layers with insufficient resolution pyramids. Use either of the following values: § 0 = Disabled § 1 = Enabled |
“UseReprojectByGDALStartingFromVersion3” |
[in, out] int |
Determines whether GDAL v3’s coordinate system reprojection library is used. This setting will only take effect after closing and reopening TerraExplorer. Use either of the following values: § 0 = Disabled § 1 = Enabled |
Graphics |
||
"UseTerrainFadeIfAvailable" |
[in, out] bool |
A Boolean that determines whether terrain fade is activated. |
"TerrainAnd3DMLQuality" |
[in, out] BSTR |
Select the resolution of the polygonal terrain model. Use any of the following values: § 0 = "Normal" § 1 = "High" § 2 = "Best - FHD" § 3 = "Best – 4K" |
Post Effects |
||
"Saturation" |
[in, out] int |
Enter a value from -100 to 100. |
"Brightness" |
[in, out] int |
Enter a value from -100 to 100. |
"Contrast" |
[in, out] int |
Enter a value from -100 to 100. |
"Gamma" |
[in, out] long |
Enter a value from 0 to 10. |
“AmbientOcclusion” |
[in, out] int |
Use either of the following values: § 0 = Disabled § 1 = Enabled |
"Depth Perception" |
[in, out] int |
Use either of the following values: § 0 = Disabled § 1 = Enabled |
"ResetPostEffects" |
[in, out] int |
Reserved. Always pass 0 (zero). |
Shadows |
||
"GlobalShadowColor" |
[in, out] long |
The color of the global shadow in hexadecimal form: 0xaabbggrr. |
"OptimizeShadowAndViewshed" |
[in, out] bool |
A Boolean that determines whether shadow and viewshed display should be optimized. |
Navigation |
||
"ZoomMode" |
[in, out] int |
Select the zoom mode: § 0 = Zoom to center § 1 = Zoom to cursor location |
"TiltAffectsAltitude" |
[in, out] bool |
A Boolean that determines whether the plane tilt affects the altitude. |
View |
||
"Speed" |
[in, out] int |
Select the speed display units. Use any of the following values: § 0 = Km/h § 1 = Mph § 2 = Knots |
[in, out] int |
Select the altitude and distance display units. Use either of the following values: § 0 = Meters § 1 = Feet |
|
“MeasurementsUnit” |
[in, out] int |
Select the display units for distance. The selection for this parameter should be consistent with the units type selected in AltitudeAndDistance. If you want TerraExplorer to automatically display the most appropriate metric or imperial (feet) units for each measurement based on size, set the value to 0 = Meter_Auto: § 0 = Meter_Auto § 1 = Millimeter § 2 = Centimeter § 3 = Meter § 4 = Kilometer § 5 = Feet_Auto § 6 = Inch § 7 = Feet § 8 = Yard § 9 = Mile § 10 = Nautical_Mile |
“MeasurementDecimalPlaces” |
[in, out] int |
Select the number of decimal places to display in distance measurements (0-6). |
“MeasurementFontSize” |
[in, out] int |
Select the font size for display of measurement information in the 3D Window (8-72). |
ShowMeasuresOnObject” |
[in, out] int |
Show segment lengths while editing. Use either of the following values: § 0 = Disabled § 1 = Enabled |
"AltitudeType" |
[in, out] int |
Select the Altitude Type display units. Use either of the following values: § 0 = Above Ground Level (AGL) § 1 = Absolute Values |
“AltitudeDecimalPlaces” |
[in, out] int |
Select the number of decimal places to display in altitude measurements (0-6). |
"LatLongCoordinates" |
[in, out] int |
Select the Lat-Long Coordinates display units. Use any of the following values: § 0 = Decimal Degrees § 1 = Degrees, Minutes, Seconds § 2= Degrees, Decimal Minutes |
Screen Overlay |
||
“UseSimplifiedNavigationControl” |
[in, out] int |
Select the type of navigation controls to display: o 0 = Navigation Control with Level Indicator o 1 = Simplified Navigation Control |
"HeadUpDisplay"
|
[in, out] int |
Determines the Head Up Display. Use any combination of the following flags: § HUD_LAYER_NONE = 0 § HUD_LAYER_ACTIVE_ARROWS = 1 § HUD_LAYER_CENTER_SIGN = 2 § HUD_LAYER_TEXT_DATA = 4 § HUD_LAYER_COMPASS = 8 § HUD_LAYER_GRAPHIC_1 = 16 (reserved) § HUD_LAYER_PAN_BARS = 32 § HUD_LAYER_DATE_TIME = 64 § HUD_LAYER_SCALE_BAR = 128 § HUD_LAYER_ZOOM_CONTROL = 256 |
"HudColor" |
[in, out] long |
The color of the HUD in the hexadecimal form: 0x00bbggrr. |
Determines how a node or object snaps to other objects. |
||
"NodeSnapping" |
[in, out] int |
Snap object or node to nodes of other objects or features. Use either of the following values: § 0 = Disabled § 1 = Enabled |
"LineSegmentSnapping" |
[in, out] int |
Snap object or node to line segments of other objects or features. Use either of the following values: § 0 = Disabled § 1 = Enabled |
"3DSnapping" |
[in, out] int |
Smart snap object or node to dynamically-identified edges and corners of any element in the 3D World. Use either of the following values: § 0 = Disabled § 1 = Enabled |
"DirectionalSnapping" |
[in, out] int |
Constrain the object line segments currently being drawn to pre-defined angle increments. Use either of the following values: § 0 = Disabled § 1 = Enabled |
"DirectionalSnappingDegrees" |
[in, out] double |
The angle increments by which to constrain object line segments currently being drawn, if DirectionalSnapping is set to Enabled (0-1). |
"ShowMeasuresOnObject" |
[in, out] int |
Show segment lengths while editing a polygon/polyline. Use either of the following values: § 0 = Disabled § 1 = Enabled |
"CreateMeasurementObjects" |
[in, out] bool |
A Boolean that determines whether to create measurement objects that will be accessible from the Measurement Objects folder in the Project Tree. Note: In TerraExplorer GUI, this option is available from the Distance and Area measurement dialogs. |
Note: Only some of the TerraExplorer Options parameters are exposed through this property. For other options, use the Settings dialog box. See “Using TerraExplorer Options” chapter in the User Manual for additional information.
JavaScript |
|
SetOptionParam( paramName, paramVal, bSave) |
C# |
|
void SetOptionParam( string paramName, object paramVal, bool bSave=False) |
C++ |
|
HRESULT SetOptionParam( BSTR paramName, VARIANT paramVal, |
Parameters
paramName
The name of the parameter whose value is being set.
paramVal
The parameter value that should be set.
bSave
A Boolean that determines whether to save the current options for use in future TerraExplorer sessions.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.