satplot
Sections
NAME
satplot - Satellite image display (GINI, AREA, Unisys, general images)
SYNOPSIS
satplot [parameters...] filename
PARAMETERS
Command Line | Resource | Default | Description |
---|---|---|---|
-h | help | No | Lists basic help information. |
-df=filename | default | wxp.cfg | Sets the name of the resource file. |
-na=name | name | satplot | Specifies the name used in resource file parsing. |
-me=level | message | out2 |
|
-fp=path | file_path | the current directory | Specifies location of database files. |
-dp=path | data_path | the current directory | Specifies the location of the input raw data files. |
-cp=path | con_path | the current directory | Specifies location of decoded/converted data files |
-ip=path | image_path | the current directory | Specifies location of output image files (.gif/,png) from WXP. |
-nc=name_conv | name_conv | name.cnv or name_conv file | This sets which name convention file to use. |
-in=input | input | giniz | Specifies the input file type. The default is giniz. The types are:
|
-if=in_file | in_file | sat_vis | Specifies the input file name tag. |
-cu=[hour] | current | none | This specifies to use current data files. |
-ho=hour | hour | none | Specifies the exact hour that a data file is valid for. |
-nh=hours[,skip] | num_hour | Value Generally 0 | Specifies the number of hours worth of data to use in the program |
-tz=zone_name | timezone | UTC | Sets timezone used in date labels |
-pd=domain | plot_domain | the domain of the image | Sets the plotting domain |
-gd=domain | grid_domain | Same as the plot domain | 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=type | plot_scale | 1.0 | Specifies a scaling factor for all plotted text, symbols, vectors, etc. |
plot_format | |||
-ca=calibration | calibration | none | Specifies the mapping from image index to value |
-mm=model,field,offset | model_mask | None or "ruc,init:2m_ag:temp:C,-10 if specified with no parameters | Sets model data to mask a satellite image |
-pa=param[,param...] | parameter | none | Specifies addition parameters to program. |
-dr=value[,value...] | draw | all | Specifies which part of the plot is to be drawn. |
-la=type | 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. |
-lo=type | logo | none | Adds a logo to the image |
-fl=font_file[,font_file...] | font_list | modern.fnt | Specifies a list of fonts to use in the plots. |
-ct=color_table | color_table | wxp.clr | Specifies the color table to use in the plot. This maps color names to actual RGB color values. |
-cod=color[:attribute...] | color_data | green (for most programs) | Specifies the color for plotted data. |
-com=color[:attribute...] | color_map | red (for most programs) | Specifies the color for background maps. |
-coll=color[:attribute...] | color_latlon | magenta:st=dsh | Specifies the color for lat/lon lines. |
-col=color[:attribute...] | color_label | white (black on inverse plots) | Specifies the text color for labels above and below the plot. |
-de=device[,parameters] | device | d for display | Specifies the output device. |
-ge=widthxheight[+x+y] | geometry | 640x512 (for windowed plots) | Specifies the window and paper geometry. |
-ti=title | title | The name of the program or the value of the name resource | Specifies the window title. |
-ic | icon | off | Specifies whether to open window in iconified mode. |
-bg=color | background | black | Specifies the background color of the window. |
-iv | inverse | off | Specifies an inverse window background (white) |
filename (positional) | filename | none | Specify input filename |
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 resrc:current resource. The input naming convention is specified by the sat_vis tag but this can be changed with the resrc:in_file resource. To generate a loop, the resrc: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 resrc: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 resrc:plot_domain resource:
- zoom:clat:clon:factor
This will zoom the image by the factor listed centered on the specified clat,clon. - full plot domain with map projection
By specifying a full plot domain, the image will be remapped to that domain. Region keywords can also be used.
If the resrc: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:
- tran_sat - this uses the internal navigation information to compute a lat,lon location for each pixel and remap it to a exact location in the original image. This can be time consuming since the internal navigation uses complex algorithms to compute satellite orbit parameters.
- tran_wxp - this uses the internal navigation information only to compute a WXP plot domain which is then used to remap the image. This is faster for remapping since the algorithms are simpler, but this may not produce an exact remap. The edges of the image may have a map that doesn't match up with the image. For smaller domains, this works well.
- remap[=len] - this uses the more accurate transformations only every 10 pixels. A linear interpolation is used in between transformed pixels. This speed up the remap process considerably (by a factor of 4-8). The default is every 10 pixels which works for most projections but this length can be changed if needed. Using a length greater than 10 can improve speed but reduce accuracy. This is only recommended for some satellite projection remappings.
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 resrc:color_table and the resrc: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:
satplot.color_table: sat.clr satplot.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.
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 resrc: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
satplot -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.satplot -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
Last updated October 2013