STK ObjectsSend comments on this topic.
IAgTerrainCollection Interface

Description

IAgTerrainCollection lists all the terrain data files available in this scenario for visualization and analysis.

Public Methods

Public Method AddAdds a terrain item to the collection.
Public Method RemoveRemoves a given index from the collection.
Public Method RemoveAllRemoves all items from the collections.

Public Properties

Public Property CountThe number of items in the collection.
Public Property ItemGiven an index, returns an IAgTerrain interface.

Example

Add analytical terrain to the scenario on Earth central body
[C#]
// Retrieve the IAgScenario interface
IAgScenario scenario = root.CurrentScenario as IAgScenario;

IAgCentralBodyTerrainCollection terrainCollection = scenario.Terrain;
IAgTerrainCollection elementCollection = terrainCollection["Earth"].TerrainCollection;

// Add terrain data file to current scenario's terrain collection
// Terrain data files traditionally have .dte extensions
IAgTerrain terrain = elementCollection.Add(terrainFile, AgETerrainFileType.eMUSERasterFile);

// Set Scenario to use terrain data file
terrain.UseTerrain = true;
Add analytical terrain to the scenario on Earth central body
[Visual Basic .NET]
' Retrieve the IAgScenario interface
Dim scenario As IAgScenario = TryCast(root.CurrentScenario, IAgScenario)

Dim terrainCollection As IAgCentralBodyTerrainCollection = scenario.Terrain
Dim elementCollection As IAgTerrainCollection = terrainCollection("Earth").TerrainCollection

' Add terrain data file to current scenario's terrain collection
' Terrain data files traditionally have .dte extensions
Dim terrain As IAgTerrain = elementCollection.Add(terrainFile, AgETerrainFileType.eMUSERasterFile)

' Set Scenario to use terrain data file
terrain.UseTerrain = True
Add Terrain for Analysis
[MATLAB]
% IAgStkObjectRoot root: STK Object Model Root
terrain = root.CurrentScenario.Terrain.Item('Earth').TerrainCollection.Add('C:\Program Files\AGI\STK 12\Data\Resources\stktraining\samples\SRTM_Skopje.pdtt', 'ePDTTTerrainFile');
terrain.UseTerrain = true;


        
© 2024 Analytical Graphics, Inc. All Rights Reserved.