XSAT

Sections

NAME

xsat - Satellite image display program

SYNOPSIS

xsat [parameters...] filename

PARAMETERS

Command Line Resource Default Description
-h help No Lists basic help information.
-df=filename default .wxpdef Sets the name of the resource file.
-na=name name xsat Specifies the name used in resource file parsing.
-ba batch No Run program in batch mode
-me=level message out2 Specifies level of messages to be displayed
  • file information - mess
  • base image information - out2
  • extra image information - out3
-fp=filepath file_path current directory Specifies location of database files.  
-dp=datapath data_path current directory Specifies the location (path) of the input raw data files. This may be modified in the name convention file.
-cp=conpath con_path current directory Specifies the location (path) of the input converted data files. This may be modified in the name convention file.
-ip=imagepath image_path current directory Specifies the default location of the output GIF images generated by the program.
-nc=name_conv name_conv name_conv The name convention file specifies how files are named in WXP. This sets which name convention file to use.
-inp=input input area Specifies the input file type. The default is area.  The types are:
  • area - AREA file
  • img - WXP image file. Name convention set to sat_img.
  • awip - NOAAPORT image file
  • unisat - Unisys image file
-if=in_file in_file sat_vis Specifies the input file name tag. The default is sat_vis, but it can be modified to any value in the filename convention file. A full name convention can be specified as well. Some special types are:
  • vis - Name convention is sat_vis
  • ir - Name convention is sat_ir
  • wv - Name convention is sat_wv
  • img - WXP image file, name convention is sat_img
  • awip - NOAAPORT image file, name convention is sat_vis
  • unisat - Unisys image file.
-of=out_file[,out...] out_file None Specifies what type of image file to create. By default, no output file is generated when the program is run. To produce an output file, this resource must be specified.  There are the following output file types:
  • img - WXP image file

Second, the out_file resource specifies the output file name tag. The default is sat_img but it can be modified to any value in the filename convention file. The file name tag can be specified separately or appended to the file type: img:sat_img_ir

A full filename can be specified which can contain name convention tags.

-pf=file_param file_param User prompt
Batch: use
This specifies how to treat output files that exist:
  • Use - use the existing file, don't overwrite. The program terminates when this occurs.
  • Over - overwrite the existing file
  • Y - same as overwrite
  • N - same as use.
-mf=mapfile[,...] map_file wxp.map or
cont.dat, country.dat for domains outside North America
Specifies the name of the map database file. Multiple maps can be specified along with attributes to describe how to draw the map.
-cu=[hour|la] current None This specifies to use current data files. The current filename is based on the name convention. An optional hour can be specified for older data. If la is specified, the program will search back to find the most recent available file.
-ho=hour hour None This resource specifies the exact hour that a data file is valid for. This locks in the start hour for a multi-file sequence.
-nh=num_hour num_hour 0 (no loop) This specifies the number of hours that will be used in the plot. If this is not specified, a single hourly plot will appear. If this is specified, a loop of plots over this time will be generated.
-pd=domain plot_domain User prompt
Batch: first domain in wxp.reg file.
This specifies the plotting domain. The projection, aspect ratio and the domain size are specified.
-re=region region Same as plot domain This resource is synonymous with the plot_domain.
-gd=grid_domain grid_domain None This specifies the domain to use for an unnavigated image. This only affects images without navigation. If this is not specified, the navigation is based on pixel values.
-sc=scale_factor plot_scale 1.0 Specifies a scaling factor for all plotted text, symbols, vectors, etc.
-fm=format plot_format None Specifies the output format of the plots.  This is generally used to specify how many decimal places get displayed on the plot and in the output raw files.
-pp=param[,param...] plot_param None Specifies additional plotting parameters. See the plot_param resource for more details.
-dr=drawable[,...] draw all Specifies which part of the plot is to be drawn.
-la=label[,...] label Program defaults Specifies the labels to be plotted around the plot. By default, labels are generated by the program and plotted above and below the plot. This resource overrides these labels.
-fl=font_list font_list modern.fnt Specifies a list of fonts to use in the plots.
-ct=color_table color_table sat.clr Specifies the color table to use in the plot. This maps color names to actual RGB color values.
-cot=color[:attr] color_text white
black
for inverse plots.
Specifies the text color for labels above and below the plot.
-com=color[:attr] color_map red Specifies the color for background maps.
-coln=color[:attr] color_line magenta:st=dsh Specifies the color for lat/lon lines.
-cof=[val:]color[:attr],... color_fill A predefined color set based on the wxp.clr color table Specifies the pixel to color set. This is also used for satellite image enhancement.  See the color_fill resource for more details.
-de=device[,...] device User prompt
Batch: display
Specifies the output device.
-ti=title title Program name Specifies the window title.
-ic icon Off Specifies whether to open window in iconified mode.
-bg=color background black
white for inverse plots
Specifies the background color of the window.
-ge=geometry geometry 640x480 Specifies the window and paper geometry.
filename[#seq] filename None
User Pompt
Batch: current=la
The name of the satellite image file to be plotted. An optional sequence number can be added to designate the time for non-WXP files.

DESCRIPTION

This program plots satellite imagery and overlays a map. The input to the program is either a McIDAS AREA file, NOAAPORT image or a WXP image file.

McIDAS Area files
Area files come in various sizes and resolutions. The image file includes a navigation block to aid programs in determining the location of the image so that data may be overlaid on the image. This navigation block contains the orbit information of the satellite which is used to locate the satellite over the earth's surface and the information needed to translate scan lines and image elements to locations on the earth's surface. Since the image is navigated, it can be remapped. The image retains the original digital information so that enhancements may be applied and temperatures may be inferred from the infrared images.
 
NOAAPORT image files
NOAAPORT images are preset image files that are formatted similar to GRIB files.   There is a product definition block which defines the satellite, image type, and projection.  The image then follows as a sequence of 8 bit pixel values which can be enhanced using any of the standard enhancement techniques.  The image can be navigated and remapped.  To use NOAAPORT images, specify "awip" for the input resource.
 
Unisys image files
This is a generic image format used by Unisys for transmission of satellite imagery.  In most cases, these are sectorized images with no navigation. Pseudo-navigation can be added with the grid_domain resource.  Some of the images are remapped to a Lambert Conformal projection and these can be remapped.  The image contains a small header in ASCII which describes the product.  The 8 bit image data follows.
 
WXP image files
These are general purpose image files. This contains 8 bit image data plus a navigation block equivalent to the projection grid given in grid files. Since the image is navigated, it can be remapped. The image has 8 bits of resolution and may be enhanced with any of the standard enhancement techniques. To use WXP images, specify "img" for the input resource.

Then, based on an input image type and a plot domain, a plot is generated. Overlay plots and loops can also be generated if the appropriate options are set.

The programs starts off by prompting the user for input satellite file name.  The user may specify the input file either via the command line of through the current resource. The input naming convention is specified by the sat_vis tag but this can be changed with the in_file resource. To generate a loop, the num_hour resource can be specified. This will tell the program to loop through this number of hours.

Image Navigation

Most satellite images are navigated.  This means they contain information that will allow a program to map pixel locations to latitude, longitude coordinates.  Once this is know, a program can overlay a map, zoom to a specific location or totally remap the image to a new projection.  In some cases, images are un-navigated.  In this case, the grid_domain resource can be used to specify a pseudo-domain which can be used to overlay maps or remap the image.  It is up to the user to determine this domain and is done by trial and error. Once determined and if the image does not change, this domain can be added to the wxp.reg file for future use.

Remapping

By default, images are not remapped but instead clipped to fit the window size.   There is no attempt to resize the image. This means most images cannot be fully displayed in the window.  There are two methods for displaying more of the image using the plot_domain resource:

If the plot_domain is a map projection, then the image will be remapped.  This is done by resampling the image using a bi-linear interpolation scheme to compute new pixel values. The location of the pixel can be computed in a number of ways:

Once completed, all navigation information is based on the new image.

Zooming

After remapping is complete, the image may be zoomed (enlarged, reduced). A zoom factor may be specified with the zoom=factor plot parameter or with the zoom domain projection.  The zoom domain syntax is zoom,clat,clon,factor where the clat and clon are used to center the zoomed image on a particular spot. The zoom factor uses values greater than one to specify an enlargement and values less than one to specify a reduction. In other words, to get a 1200x600 image into a 640x512 window, a zoom factor of .6 might be used. Enlargements are done by using bilinear pixel averaging.

Color Table

Once the image is remapped and zoomed, a color table is applied to it.  This is based on the color_table and the color_fill resources. The recommended setup is to use the sat.clr color table with 0-50 as the color fill specification. This results in a image using 50 shades of gray. Other table/fill combinations can be used to modify/enhance the image.  These are the lines for the resource file:

   xsat.color_table: sat.clr
   xsat.color_fill: 0-50

The original pixel values are modified from a 8 bit intensity to an even range of colors in the is modifies the original pixel values to color indices for plotting.

Dithering

The image may also be dithered for display on displays which have depth less than 8 bits. The image may also be set up for overlay on top of another image where black regions on the image become transparent allowing the underlying image to show through. The colors can be specified with dither value and color. This is handy for screens that cannot support gray shades such as monochrome displays. Dither colors are specified by using the following syntax:

black%6white

The original or background color is specified followed by a "%", then the dither percent value and the dither or foreground color. The above example uses the 3x3 dither matrix and gives possible dither values of 0 through 9. The result is a 6/9 dither of white over black. Using 0 for the dither value gives the original color. Using 9 for the value gives the only dither color. This is somewhat restrictive for monochrome screens, so a second dither scheme is provided which is a 5x5 dither matrix. This gives a total of 26 possible dither values which are specified by lower case alphabetic characters "a" through "z". The value "a" gives the original color and "z" gives the dither color.

Enhancement

If needed, the image may be enhanced. Satellite enhancement is conceptually similar to the color fill parameters used by other WXP programs except attributes are not applicable for satellite pictures. The color parameters are specified with the color_fill resource. The syntax is:

[val:]color[%dither],[val:]color[%dither]...

The color values val are image pixel values ranging from 0 to 255. The value may be specified as a image pixel value or as a infrared temperature based on the GOES conversion scheme. The temperature is specified by preceding the value by a "c". For example, "c-25" specifies the image pixel value corresponding to -25 Celsius. This way infrared images can be enhanced based on the temperatures the image represents.

NOTE: This works only for increasing image pixel values. As the image pixel values increase, the temperatures DECREASE and therefore temperature values must be listed in decreasing order.

Enhancement Files

Since enhancement schemes can become very complicated, specifying them on the command line would be inappropriate.  Thus, an enhancement file should be used.  This file is very similar to a color fill file except it has an additional line at the beginning of the file that names the enhancement. Here is the MB enhancement file:

   MB
   0:black
   c29:1
   2-9
   c6:10
   11-15
   c-31:16
   c-32:cyan
   c-43:lcyan
   c-54:lblue
   c-60:blue
   c-64:green
   c-70:lgreen
   c-76:brown
   c-81:yellow
   c-90:black 

Overlay Images

If satellite overlay is specified (over plot parameter), the image will be placed on the screen as a non-destructive overlay for all parts of the image where the pixels are colored black. These areas will then be transparent whereas the non-black areas will be opaque. The color_fill resource is then used to specified which pixel values are transparent. Also, a fill pattern can be applied to the overlay image using the fill[=pattern] plot parameter resource.

Final Plot

The image is then converted into image which can be displayed within the window. The final image size is default 640x427 pixels depending on domain and window geometry. If the image is navigated, a map is then overlaid to provide proper georeferencing. The projection information is then displayed so that it can be used with overlay plots. In most cases, it is recommended to remap the image since many WXP programs don't work well overlaying to a satellite projection. The program finally annotates the image with the date and time in the upper right and general comments about image type in the upper left. For area files, the comment line in the area header is displayed by default. This can be rather cryptic so it is recommended to change the label with the label resource (-la=ul:GOES_East_IR).

The image may also be printed using a Postscript interface built into the xsat program. This creates a gray scale image based on a 640x512 sized window. If color output is requested, specify pscolor. This requires a Postscript level 2 printer (for the colorimage Postscript command) which all color Postscript printers support. Navigation is used to overlay a map for final output. Printer output is not prompted for but must be specified on the command line. It should also be noted that images can take over ten minutes to print on a fast Postscript printer.

EXAMPLES

   xsat -if=vis -cu=la -de=d

This displays the latest visible satellite image.  For most images, this will only be a subset of the entire image.  To get the full image, either zoom or remap needs to be done.

   xsat -if=vis -cu=la -pd=us -de=d

This will remap the image to a US plot domain. 

   xsat -if=ir -cu=la -cof=sat_mb.enh -de=d

This will enhance the latest IR image with the MB enhancement scheme.

   xsat -if=vis -cu=la -pd=us -pl=none -of=img

This remaps the image and saves the output into an image file for later use.

FILES

SEE ALSO


For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on July 28, 1998