Keywords | Examples

AgGxChunkImageConverter

The Chunk Image Converter, AgGxChunkImageConverter, is a stand-alone application that converts terrain and imagery to .jp2, .pdttx, and .pdtt file formats for 3D visualization in STK.

The MUSE Raster file format is deprecated for STK 12.8.

Using the application

You can run AgGxChunkImageConverter.exe from a command prompt window or from another application. The command format is:

AgGxChunkImageConverter -i "<input file>"

Argument Description
-i "<input file>"

Specify the file that you want to convert. The input file contains one or more conversion blocks. Each block contains information to convert an image to a .pddtx or .jp2 file, and terrain to a .pdtt file.

Using the CIB or CADRG .toc file, you can convert the entire table of contents to .pdttx or .jp2 files with or without .pdtt files.

Each conversion must be demarcated by the "BeginChunkImageConversion" and "EndChunkImageConversion" keywords. The other keywords that you can use are described in the Keywords table below.

File format

BeginChunkImageConversion

  • InputType {CIB | CADRG}
  • InputImageFileDirectory "<file directory>"
  • InputImageFilename "<file name>"
  • InputImageHeaderFilename "<header file name>"
  • OutputType {PDTTX | JP2}
  • TerrainFileType "<terrain type>"
  • TerrainFullFilename "<terrain full filename>"
  • TerrainVersion1 {yes | no}
  • InputImageExtents <south lat> <west lon> <north lat> <east lon>
  • SubregionExtents <south lat> <west lon> <north lat> <east lon>
  • CompressionProfile {Default | BIIF_NPJE | BIIF_EPJE}
  • CompressionRatio <value>
  • OutputImageFileDirectory "<file directory>"
  • TransparentColor <red> <green> <blue>
  • OutputImageFilename "<file name>"
  • OutputTerrainFileDirectory "<file directory>"
  • OutputTerrainFilename "<file name>"
  • CentralBody "<central body name>"
  • SaveDATT {yes | no}

EndChunkImageConversion

Keywords

Keyword Description
InputType {CIB | CADRG} Enter the file format of the image that you want to convert.

This argument is required for CIB and CADRG images. It is not required for other file formats because the input type is determined from the file extension.

InputImageFileDirectory "<file directory>" Enter the directory containing the image file that you want to convert.
InputImageFilename "<file name>" Enter the name of the file, including extension, that you want to convert.
InputImageHeaderFilename "<header file name>" Enter the name of a header file that contains multiple images that you want to convert.

If you specify the InputImageHeaderFilename keyword but not the InputImageFilename field, then the chunk image converter will automatically process all the images inside of the a .toc header file.

It will put the output images into the OutputImageFileDirectory and the output terrain files into the OutputTerrainFileDirectory.

OutputType {PDTTX | JP2}

This keyword is only valid for CIB and CADRG images. It sets the output type for InputImageHeaderFilename.The default is PDTTX.

TerrainFileType "<terrain type>" Specify the file type of the source terrain data. You can use a raw terrain file or a .datt file to add terrain to the overlay that you are converting. This keyword is not required if you are creating a surface image.
TerrainFullFilename "<terrain full filename>" Enter the name and file path to the terrain source. This keyword is not required.
TerrainVersion1 {yes | no} Specify the version of .pdtt file that you want to create. Enter yes to create a version 1 .pdtt file. If you enter no or do not include this keyword, the converter will create a version 2 .pdtt file. The version 2 .pdtt format supports terrain data that includes measurements less than one meter. You cannot load Version 2 files into versions of STK earlier than 10.
InputImageExtents <south lat> <west lon> <north lat> <east lon> Specify the geographic extent of the image that you want to convert. This keyword is not required for images that have an associated .pos file or that contain geographic data, such as geoTif, CIB, and CADRG.
SubregionExtents <south lat> <west lon> <north lat> <east lon> Specify the geographic subregion of the image that you want to convert. This region must be within the overall image extent. If the terrain type PDTT is specified, this parameter is ignored and the .pdtt file subregion is used. If you do not specify this keyword, the entire image is converted.
CompressionProfile {Default | BIIF_NPJE | BIIF_EPJE} Specify the compression profile, if you are converting to a .jp2 file. This keyword is only valid for .jp2 files.
CompressionRatio <value>

Enter the compression ratio if you are using compression to convert to a .jp2 file. Valid values are from 1 to 25, where 1 indicates lossless. Lossless is the default.

This keyword is only valid for .jp2 files.

TransparentColor <red> <green> <blue> Enter the transparent color values. Valid values are from 0 to 255. If you specify this argument, STK will not draw any pixels of this value in the image. If the image has one channel, specify only one gray value. If the image has three channels, specify red, green, and blue. If you do not specify this argument, STK will not use transparent colors.
OutputImageFileDirectory "<file directory>" Enter the output directory for the converted .pdttx file.
OutputImageFilename "<file name in quotes>" Enter the name of the file for the converted .pdttx or .jp2.
OutputTerrainFileDirectory "<file directory>"

Enter the output directory for the converted .pdtt terrain file, if you have specified a terrain source.

If you do not specify this keyword, the OutputImageFileDirectory is used.

OutputTerrainFilename "<file name>" Enter the output file name for the converted .pdtt terrain file, if you have specified a terrain source.
CentralBody "<central body name>"

Specify the central body associated with the converted data. If you do not specify this keyword, the central body will be Earth.

SaveDATT {yes | no}

When the converter creates a .pdtt file from a terrain source other than a .datt file, it creates an intermediate .datt file. To save the .datt file after the .pdtt file has been created, enter yes. If you enter no or do not include this keyword, the .datt file will be deleted.

Examples

Converting a Bmp Image to a JP2 File

BeginChunkImageConversion
  • InputImageFileDirectory "C:\STK8User\Images"
  • InputImageFilename "denver.bmp"
  • OutputImageFileDirectory "C:\STK6xUser\Config\CentralBodies\Earth\GeoData"
  • OutputImageFilename "denver.jp2"
  • InputImageExtents 42 20 45 24
EndChunkImageConversion

Converting a Bmp Image with Compressed Data to a JP2 File

BeginChunkImageConversion
  • InputImageFileDirectory "C:\STK6xUser\Pixmaps\MarkersWin"
  • InputImageFilename "erie.bmp"
  • OutputImageFileDirectory "C:\STK8User\Config\CentralBodies\Earth\GeoData"
  • OutputImageFilename "erie.jp2"
  • InputImageExtents 41.5 11.5 45.5 14
  • CompressionRatio 5
  • CompressionProfile BIIF_NPJE
EndChunkImageConversion

Converting a Bmp File to JP2 and Pdtt Files

BeginChunkImageConversion
  • InputImageFileDirectory "C:\STK8User\Myimages"
  • InputImageFilename "tampa.bmp"
  • OutputImageFileDirectory "C:\STK6xUser\Config\CentralBodies\Earth\GeoData"
  • OutputImageFilename "tampa.pdttx"
  • InputImageExtents 41.5 11.5 45.5 14
  • TerrainFileType "USGS"
  • TerrainFullFilename "C:\STKInstall\STKData\CentralBodies\Earth\Dted\yugo.dem"
  • OutputTerrainFileDirectory "C:\STK6xUser\Config\CentralBodies\Earth\GeoData"
  • OutputTerrainFilename "yugo.pdtt"
EndChunkImageConversion

Converting a CADRG Image to a Pdttx with Pdtt Files

BeginChunkImageConversion
  • InputImageFilename "C:\dmadata\Data\CADRG\RPF\CJOG\CJOGZ01\00YWD013.JG1"
  • InputType CADRG
  • OutputImageFileDirectory "C:\output"
  • OutputImageFilename "cadrg.pdttx"
  • TerrainFileType "AGI"
  • TerrainFullFilename "C:\agiWorldTerrain\world30.hdr"
  • OutputTerrainFileDirectory "C:\output"
  • OutputTerrainFilename "cadrg.pdtt"
EndChunkImageConversion

Converting an Entire CADRG Table of Contents to Pdttx Files

BeginChunkImageConversion
  • InputImageFileDirectory "C:\dmadata\Data\CADRG\RPF"
  • InputImageHeaderFilename "A.TOC"
  • OutputImageFileDirectory "C:\output"
EndChunkImageConversion

Converting an Entire CADRG Table of Contents to Pdttx Files with Pdtt Files - Example 1

BeginChunkImageConversion
  • InputImageFileDirectory "C:\dmadata\Data\CADRG\RPF"
  • InputImageHeaderFilename "A.TOC"
  • OutputImageFileDirectory "C:\output"
  • TerrainFileType "AGI"
  • TerrainFullFilename "F:\TerrainCD\terrain\world30.hdr"
  • OutputTerrainFileDirectory "F:\TerrainCD\terrain\output"
EndChunkImageConversion

Converting an Entire CADRG Table of Contents to Pdttx Files with Pdtt Files - Example 2

In this example an output terrain file directory is not specified, so the pdtt files are placed in the same directory as the pdttx files.

BeginChunkImageConversion
  • InputImageFileDirectory "C:\dmadata\Data\CADRG\RPF"
  • InputImageHeaderFilename "A.TOC"
  • OutputImageFileDirectory "C:\output"
  • TerrainFileType "AGI"
  • TerrainFullFilename "C:\agiWorldTerrain\world30.hdr"
  • EndChunkImageConversion

Converting AGI World Terrain to a Pdtt File - Example 1

In this example, subregion extents are not specified. The entire file is converted.

BeginChunkImageConversion
  • TerrainFileType "AGI"
  • TerrainFullFilename "C:\agiWorldTerrain\world30.hdr"
  • OutputTerrainFileDirectory "C:\agiWorldTerrain\"
  • OutputTerrainFilename "junk.pdtt"
EndChunkImageConversion

Converting AGI World Terrain to a Pdtt File - Example 2

In this example, subregion extents are specified. Only the specified region is converted. Also, the .datt file is saved.

BeginChunkImageConversion
  • TerrainFileType "AGI"
  • TerrainFullFilename "C:\agiWorldTerrain\world30.hdr"
  • OutputTerrainFileDirectory "C:\agiWorldTerrain\"
  • OutputTerrainFilename "junk.pdtt"
  • SubRegionExtents 0 0 1 1
  • SaveDATT Yes
EndChunkImageConversion

Convert a Mars Image and MOLA Terrain Data to Pdttx and Pdtt Files using a Subregion

BeginChunkImageConversion
  • InputImageFileDirectory "C:\output\"
  • InputImageFilename "mars1.bmp"
  • OutputImageFileDirectory "C:\output\"
  • OutputImageFilename "mars1.pdttx"
  • InputImageExtents 40 -140 43 -137
  • SubRegionExtents 41 -139 42 -138
  • TerrainFileType "MOLA"
  • TerrainFullFilename "C:\Terrain\PlanetaryData\Mars\128PixelsPerDegree\Radius\megr44n180hb.lbl"
  • OutputTerrainFileDirectory "C:\output"
  • OutputTerrainFilename "mars1.pdtt"
  • CentralBody "Mars"
EndChunkImageConversion

Converting Mars MOLA Terrain Data to a Pdtt Using a Subregion

BeginChunkImageConversion
  • SubRegionExtents 10 10 11 12
  • TerrainFileType "MOLA"
  • TerrainFullFilename "C:\Terrain\PlanetaryData\Mars\128PixelsPerDegree\Radius\megr44n180hb.lbl"
  • OutputTerrainFileDirectory "C:\output"
  • OutputTerrainFilename "mars2.pdtt"
  • CentralBody "Mars"
EndChunkImageConversion

Converting an image with multiple terrain files

You can add multiple terrain sources to an image that you convert with the AgGxChunkImageConverter. You must specify the terrain sources before the files that you want to convert, as shown in the following example:

BeginTerrainSource
  • TerrainFileType "MOLA"
  • TerrainFullFilename "D:\temp\ldem_1024_00n_15n_000_030.lbl"
  • CentralBody "Moon"
EndTerrainSource BeginTerrainSource
  • TerrainFileType "MOLA"
  • TerrainFullFilename "D:\temp\ldem_1024_00n_15n_030_060.lbl"
  • CentralBody "Moon"
EndTerrainSource BeginChunkImageConversion
  • TerrainFileType "MOLA"
  • TerrainFullFilename "D:\temp\ldem_1024_00n_15n_000_030.lbl"
  • TerrainVersion1 No
  • OutputTerrainFileDirectory "D:\temp\output"
  • OutputTerrainFilename "ldem_1024_00n_15n_000_030.lbl.pdtt"
  • CentralBody "Moon"
  • SaveDATT No
EndChunkImageConversion BeginChunkImageConversion
  • TerrainFileType "MOLA"
  • TerrainFullFilename "D:\temp\ldem_1024_00n_15n_030_060.lbl"
  • TerrainVersion1 No
  • OutputTerrainFileDirectory "D:\temp\output"
  • OutputTerrainFilename "ldem_1024_00n_15n_030_060.lbl.pdtt"
  • CentralBody "Moon"
  • SaveDATT No
EndChunkImageConversion