NASA - National Aeronautics and Space Administration

+ NASA Homepage
+ NASA en Español
+ Contact NASA
Go
Planetary Data System - Engineering Node Banner

Operation

This document describes how to operate the Transform Tool. The following topics can be found in this document:

Note: The command-line examples in this section have been broken into multiple lines for readability. The commands should be reassembled into a single line prior to execution.

Tool Execution

The Transform Tool can be executed in various ways. This section describes how to run the tool, as well as its behaviors and caveats.

Command-Line Options

The following table describes the command-line options available:

Command-Line OptionDescription
-t, --targetExplicitly specify a PDS3 or PDS4 product label that contains a reference to an image file to transform. The target can be specified implicitly as well. (example: transform i943630r.xml)
-o, --outputSpecify an output file where the transformed image will reside. If this option is not specified on the command-line, the tool will default to creating an output file using the target's data file name with the user-specified format type as the file extension. This output file will be located in the current working directory.
-f, --format-typeSpecify a format type to use for the transformation. The valid values are: raw, tif, jpeg, mgn-fbidr, WBMP, PNM, JPG, wbmp, JPEG, PNG, tiff, BMP, RAW, GIF, TIF, TIFF, jpg, bmp, pnm, png, gif, jp2, JP2. The following additional format types are available for PDS4-related transformations: pvl, PVL, html, HTML, html-structure-only, HTML-STRUCTURE-ONLY, csv, CSV
-V, --versionDisplay the release number and copyright information.
-h, --helpDisplay tool usage.

Running the Transform Tool

The Transform Tool requires the passing in of a PDS3 or PDS4 product label that contains a reference to an image file. In addition, the tool assumes that the referenced image file is co-located with the product label. Under the current implementation, if there are multiple image files referenced in a target label, the tool will default to only transforming the first image file reference. Other notable caveats with this initial version of the tool include:

  • Transformations of PDS3 images greater than 8-bits are not supported at the moment.
  • For PDS3 to TIFF transformations, the output tile size defaults to 8 lines by the image width.

This section demonstrates some of the ways that the tool can be executed using the command-line option flags:

  • Transform a Single PDS4 Array 2D Image
  • Transform a Single PDS4 Label To Parameter Value Language (PVL) File
  • Transform a Single 8-Bit PDS3 Image

The files used in the command-line examples below are packaged with the tool in the examples directory.

Transform a Single PDS4 Array 2D Image

The following command demonstrates transforming a PDS4 array 2D image referenced in the associated product label, i943630r.xml, into a jpeg image file named i943630r.jpg:

% transform ../examples/i943630r.xml -o i943630r.jpg -f jpg
        

Under the current implementation, for PDS4 data products, the tool only supports the transformation of array 2D images.

If the -o flag option is not specified on the command-line, the tool will default to creating an output file using the target image file name with the user-specified format as the file extension. The resulting output file will be written to the current working directory. The following command demonstrates transforming a PDS4 array 2D image referenced in the associated product label, i943630r.xml, into a graphics interchange format file:

% transform ../examples/i943630r.xml -f gif
        

The resulting output is written to the output file i943630r.gif in the current working directory.

Transform a Single PDS4 Label To Parameter Value Language (PVL) File

The following command demonstrates transforming a PDS4 label, i943630r.xml, to a PVL file, i943630r.pvl:

% transform ../examples/i943630r.xml -o i943630r.pvl -f pvl
        

Transform a Single 8-Bit PDS3 Image

The following command demonstrates transforming a PDS3, 8-bit image referenced in the associated attached label, FHA01118.LBL, into a bitmap image file named FHA01118.BMP:

% transform ../examples/FHA01118.LBL -o FHA01118.BMP -f bmp
        

The following command demonstrates transforming a PDS3, 8-bit image referenced in the associated detached label, FF01.LBL, into a portable network graphics file named FF01.PNG:

% transform ../examples/FF01.LBL -o FF01.PNG -f PNG
        

FirstGov Logo
+ Freedom of Information Act
+ NASA 2003 Strategic Plan
+ NASA Privacy Statement, Disclaimer, and
   Accessiblity Certification

+ Copyright/Image Use Policy
NASA Logo
Curator: Emily.S.Law
Webmaster: Maryia Sauchanka-Davis
NASA Official: William Knopf
Last Updated:
+ Comments and Questions