Using External Terrain Data

STK Pro, STK Premium (Air), STK Premium (Space), or STK Enterprise
You can obtain the necessary licenses for this training by contacting AGI Support at support@agi.com or 1-800-924-7244.

The results of the tutorial may vary depending on the user settings and data enabled (online operations, terrain server, dynamic Earth data, etc.). It is acceptable to have different results.

Capabilities Covered

This lesson covers the following STK Capabilities:

  • STK Pro

Overview

This tutorial will familiarize you with importing terrain and imagery for visualization in STK. In this tutorial, you will use STK image and terrain converters to generate STK visualization files and display them in both 2D and 3D Graphics windows.

What You Will Learn:

You will learn:

  • The STK terrain and imagery data formats
  • How to introduce terrain or elevation data to the STK Scenario
  • How to use the Imagery and Terrain Converter
  • How to use the Color Elevation Imagery tool
  • How to load image inlays to both 2D and 3D Graphics windows

To accommodate 3D rendering performance in a dynamic window, STK requires data formats that are optimized for speed and streaming. STK utilizes proprietary formats and an open format (JPEG 2000) to accomplish this and offers a conversion tool to allow a wider range of geospatial data to import into STK.

STK imagery visualization formats

Option Description
.PDTTX AGI proprietary format for 3D and 2D Graphics windows
JP2 (JPEG 2000) Non-proprietary format for 3D and 2D Graphics windows
Option Description
.PDTT AGI proprietary format for 3D Graphics windows

Video Guidance

Watch the following video. Then follow the steps below, which incorporate the systems and missions you work on (sample inputs provided).

Create a Scenario:

  1. Click the Create a Scenario () button.
  2. Enter the following in the New Scenario Wizard:
  3. Option Value
    Name Mountain
    Location C:\Users\<username>\Documents\STK 12\
    Start Accept default start time
    End Accept default end time
  4. When you finish, click OK .
  5. When the scenario loads, click Save (). A folder with the same name as your scenario is created for you in the location specified above. This will ensure you do not accidentally overwrite your previous work.
  6. Verify the scenario name and location and click Save .
  7. Close the Insert STK Objects tool ().

Importing Terrain Data to a Scenario

In this exercise, you will attach terrain data to your scenario, which will be utilized in several of the exercises in this tutorial.

  1. Open the scenario () properties.
  2. Select Basic – Terrain.
  3. Clear the Use terrain server for analysis check box.
  4. Click Apply to apply changes.
  5. Click Add and in the Open dialog box select USGS DEM (DEM) in the file type drop down.
  6. Browse to the file hoquiam-e.dem in <STK Install Folder>\Data\Resources\stktraining\samples and click Open .
  7. Click OK to apply changes and dismiss the Properties Browser.
  8. Save () your scenario.

Your terrain data is now in your scenario and can be used for analysis. However, you would like to visually see it with draped imagery. Let’s see how that can be done.

Using the Imagery and Terrain Converter

The Imagery and Terrain Converter can be used to convert terrain and imagery content for 2D and 3D visualization. If your imagery is already in a native format, such as JPEG 2000, conversion is not necessary. (See Appendix A - Workflow for STK Imagery and Terrain Converter.) An image of St. Helens is used to drape over the terrain (image is courtesy of Space Imaging, Inc.).

Creating a 3D Image Inlay

In this exercise, you will utilize the Imagery and Terrain Converter to create two inlays for the 3D Graphics window that will display a photographic image of St. Helens.

  1. Click the Utilities menu.
  2. Select Imagery and Terrain Converter…
  3. Select the Single Image page.
  4. Click ... button next to the Image Filename: field.
  5. Browse to the <STK Install Folder>\Data\Resources\stktraining\samples.
  6. Select the SpaceImaging St Helens.sid file.
  7. Click Open .
  8. Click Convert .

Notice that in the Image Extent area, the Image fields are automatically completed once you open the SpaceImaging St Helens.sid image file. This is because the file contains georeferencing data that STK can read. For some types of image files—those that do not contain georeferencing data—you will have to enter the image extents manually.

Convert a DEM to JP2

Now that you have converted an *.sid file, try to convert a *.dem file.

  1. In the Terrain section, select the Use check box.
  2. Select the hoquiam-e.dem terrain data—which will be displayed with its path name—from the drop-down menu.
  3. In the Output Data section, ensure JPEG 2000 Image (jp2) is selected from the drop-down list in the Image File - Format: field.
  4. Select the Compression Ratio option.
  5. Set the Compression Ratio to 10.
  6. Set the Image File Directory to your scenario folder.
  7. Click Convert .
  8. You may have to scroll down in the Imagery and Terrain Converter in order to see the Convert button. The conversion for the terrain and imagery will now happen. Please wait until the conversion is done.

  9. Click Close .

View the Terrain in 3D

  1. Open the Globe Manager ().
  2. Extend the Add Terrain/Imagery () menu on the Globe Manager toolbar.
  3. Select Add Terrain/Imagery (Add Terrain/Imagery button).
  4. Browse to the location of the files.
  5. Select SpaceImaging St Helens.jp2 and SpaceImaging St Helens.pdtt.
  6. Click Add and your .jp2 and .pdtt will be available in your Globe Manager. If the “Use Terrain for Analysis” window appears, click No .
  7. Select SpaceImaging St Helens.jp2 in the Globe Manager. Click on the Zoom To () button in the Globe Manager toolbar. This will take you directly to the image on the 3D Graphics window.

Disable and Enable the Extents

In one action we converted an image (.pdttx) and terrain (.pdtt) with the same extents.

  1. In the Globe Manager, experiment with disabling or enabling them.

What if you don't have an image and you just want a terrain file (.pdtt)? Under Image Converter -> Terrain Region you can select scenario terrain sources from the drop down and covert them as a whole or subsets.

3D View: Mt. St. Helens

Displaying Your Image Inlay in 2D

  1. Open the 2D Graphics window properties browser ().
  2. If you do not have a 2D Graphics window already, go to the View menu and select New 2D Graphics Window.

  3. Select the Imagery page.
  4. Click Add… and verify that the file type is set to All Supported Types.
  5. Browse to your scenario folder or the location where you saved the file, select SpaceImaging St Helens.jp2 and click Open .
  6. Verify that the Show check box is selected.
  7. Select the Show Image Extents check box.
  8. Select SpaceImaging St Helens.jp2 and click the Zoom To () icon to zoom in on the image in the 2D Graphics Window.
  9. Click OK to apply changes and dismiss the Properties Browser.
  10. You can zoom out a bit in the 2D Graphics Window using the mouse scroll wheel. This will allow you to see the extents of the image inlay.
  11. 2D View: Mt. St. Helens

Creating Color Elevation Imagery

You can use the Create Color Elevation Imagery tool to generate images with topographically derived colors (See Appendix B):

  1. From the previous steps, the 2D Graphics Window should be zoomed in on St, Helens. If not, zoom in on St. Helens.
  2. Click the Utilities menu and select Create Color Elevation Imagery…
  3. Ensure the Select On 2D Map check box is selected.
  4. On the 2D Graphics window, using your cursor, draw out a rectangle around St. Helens. You will notice that the terrain region coordinates will update in the Create Color Elevation Imagery window.
  5. Return to the Create Color Elevation Imagery window and in the Output File area, ensure JPEG 2000 Image (.jp2) is selected as the Output File Format.
  6. Do not select Create a pdtt file for the selected region. You already made one in the previous exercise.

  7. In the Directory field, click the ... button, navigate to your scenario folder and click OK .
  8. Enter St Helens Topo in the Filename field.
  9. Click Convert .
  10. Close the Create Color Elevation Imagery window.
  11. In the Globe Manager section, extend the Add Terrain/Imagery () menu.
  12. Select Add Terrain/Imagery (Add Terrain/Imagery button).
  13. Browse to your scenario folder or the location where you saved the file and select St Helens Topo.jp2.
  14. Click Add .

You will see your topographical inlay in the 3D Graphics Window.

3D View: Color shading based on terrain height

Adding To the 2D Graphics Window

  1. Open the Properties Browser () for the 2D Graphics window and select the Imagery page.
  2. Click Add… , and verify that the file type is set to All Supported Types.
  3. Browse to your scenario folder or the location where you saved the file and select St Helens Topo.jp2.
  4. Click Open .
  5. Click OK to apply changes and dismiss the 2D Graphics Properties. Your topographical inlay will now be visible in the 2D Graphics window.
  6. Save your scenario if you want to keep changes.
  7. 2D View: Color shading based on terrain height

Conclusion

This tutorial provided a basic overview of the Imagery and Terrain Converter and the Create Color Elevation Imagery tool. The example input imagery provided could also be used directly with JPEG 2000. STK also offers command line versions that are license-free (the exception is generating JPEG 2000 files for images over 500 MB large) for batch conversions.

Lastly, if you want to store your globe or share your globe with another user, you can export a globe file (.GLB). Previously a globe file was an essential part of a scenario, in STK 9 and higher, the globe file is only necessary for importing and exporting globes.

Appendix A - Workflow for STK Imagery and Terrain Converter

Appendix B - Workflow for STK Create Color Elevation Imagery Tool