expim - exports TDF images in common image formats

SYNOPSIS

expim  [ parameter=value ]  [ inputfile outputfile ]
expim  [ parameter=value ]  [ inputfile ... directory ]

Parameters are: image_format, jpeg_quality, image_var, image_colors, color_palette, draw_indexes, draw_names, display, rgb.txt_path .

DESCRIPTION

expim converts a Terascan Dataset (TDF) image into Sunraster, Encapsulated Postscript, PNG, JPEG, PPM, or TIFF, MIFF (Metoc TIFF), GEOTIFF, Marta PCX, and GIF formats. This command is useful for automatic generation of images in different formats. There exists public domain software for converting output formats to most common image formats, including GIF and XWD.

expim takes one image variable from the input dataset and produces a color-scaled output image in one of the formats mentioned above. The input variable must be byte data; to convert another word-size, use the imscale function.

expim lets you apply any of the Terascan 8-bit color palettes to the output image. It also allows overlays to be drawn in any of the colors supported by X windows. The overlays should be created and injected into the input dataset, using the xinject function.

MIFF and Marta PCX are navy formats. MIFF is essentially TIFF with a few additional tags to encode earth location and data scaling information. MIFF should be used to export data that has been remapped to Mercator, polar stereographic or Lambert conic rectangular projections.

Marta PCX is essentially a PCX without palette information and with a modified header for encoding earth location. It appears limited to exporting data from geostationary satellites that has NOT been remapped.

Because they contain earth location information, neither MIFF nor Marta PCX formats are intended for use with image data containing injected geopolitical or latitude and longitude grid overlays.

PARAMETERS

image_format
Specifies the format of the output image. Sunraster, Encapsulated Postscript, PNG JPEG, PPM, or TIFF are supported now. Valid responses are [postscript, sunraster, tiff, geotiff, jpeg, png, ppm, metoc, marta, gif]. The default is postscript.
jpeg_quality
OPTIONAL. JPEG image quality percent. jpeg_quality=100 gives the highest image quality, but with the least compression. The valid range is [0, 100]. The default is 75.
image_var
Specifies the variable to be exported. A valid response is any 2-D byte variable name in the input dataset. There is no default.
image_colors
Specifies the number of values to be used for the image palette. If image_colors is n, then the color palette will be applied to data in the range [0, n-1]. The valid range is [2, 256]. The default is 216.
color_palette
Specifies the Terascan color palette to apply to the image. It can be any of the color palettes usable by xvu. These are normally located in $REFDATA/palettes.
draw_indexes
Specifies the input dataset values to be used for draw colors. This is usually used for applying colors to the overlays. The valid range is [0, 255]. The default is blank, i.e., no draw colors.
draw_names
Specifies the individual colors to use for the draw indexes. This is a list equal in number to the draw indexes; valid responses are any X windows resource color (which you can list with the showrgb command). There is no default.
display
OPTIONAL. This parameter lets you specify an alternate X display server. The X server must be running, and you must have access to the server in order for expim to run. Access is normally controlled with the xhost command. The default is hostname:0, the display server of the machine on which the function is run.
rgb.txt_path
OPTIONAL. In case the display cannot be opened, this parameter specifies the path of an rgb.txt file. The default is /usr/lib/X11/rgb.txt.
The rgb.txt file is used to convert draw color names to (red, green, blue) color gun values. Each line in the file has the following form:
 

red-value green-value blue-value color-name

Color gun values must be in the range [0, 255].

EXAMPLES

In this example an AVHRR dataset is converted to a byte dataset, coast and grid metafiles are created and injected, then the dataset is exported to Sunraster format.

% imscale
in/out files   : char(255) ? n12.94139.2235.avhrr n12.byte
include_vars   : char(255) ? [] avhrr_ch3
image_colors   : int       ? [216] 240
max_width      : int       ? [1280]
max_height     : int       ? [1024]
fixed_size     : char(  3) ? [no]
zoom_factor    : int       ? [1]
real_resample  : char(  3) ? [yes]
est_range      : char(  3) ? [yes] no
min_value      : real      ? -50
max_value      : real      ? 30
invert_scale   : char(  3) ? [no] yes
north_up       : char(  3) ? [no] yes

% coast
output file    : char(255) ? [Coast] n12.cst
master_file    : char(255) ? [Master] n12.94139.2235.avhrr
reduce_factor  : int       ? [1]
coast_file     : char(255) ? [wdb2.cil]

% llgrid
output file    : char(255) ? [Grid] n12.grid
master_file    : char(255) ? [Master] n12.94139.2235.avhrr
grid_type      : char(  7) ? [lines]
delta_lat      : real      ? [1] 5
delta_lon      : real      ? [1] 5

% xinject
in/out files   : char(255) ? n12.byte n12.cst n12.grid n12.inj
bg_var_name    : char( 31) ? avhrr_ch3
colors_per     : int       ? [1]
meta_colors    : real(  2) ? 240 241
line_widths    : int (  2) ? [1 1]
line_types     : char( 15) ? [solid solid]
marker_types   : char(  3) ? [+ +]
marker_sizes   : int (  2) ? [15 15]
image_colors   : int       ? [216] 240

% expim
in/out files   : char(255) ? n12.inj n12.ras
image_format   : char( 10) ? [postscript] sunraster
image_var      : char(255) ? avhrr_ch3
image_colors   : int       ? [216] 240
color_palette  : char(255) ? hsl256
draw_indexes   : int (255) ? [] 240 241
draw_names     : char( 63) ? black white

FILES

$REFDATA/palettes

SEE ALSO

imscale, xinject, palettes

NOTES

There may be a name conflict with an X11 function imscale.


Last Update: $Date: 1999/02/17 11:39:18 $