wedge - Creates an annotated color wedge metafile

SYNOPSIS

wedge  [ parameter=value ...]  [  outputfile ]

Parameters are: master_file, wedge_lines, wedge_samples, wedge_dir, text_height, text_type, two_color_text, line_offset, sample_offset, scale_min, scale_max, invert_scale, label_base, label_step, discrete_steps, outline, display .

DESCRIPTION

This function is used to create an annotated color-wedge metafile. Annotation is based on user-specified scaling and labeling criteria. Wedges can be continuous (e.g., use all image colors, regardless of labels) or discrete (e.g., use only a few image colors at fixed intervals, matching labels).

For example, suppose that scale_min and scale_max parameters indicate that the scale range is [-5, 45]. Suppose that label_base and label_step parameters indicate that labels start with 0 and increment by 10. If continuous, the wedge would use all image colors. If discrete, the wedge would use only colors corresponding to original data values 0, 10, 20, 30, and 40.

Continuing the above example, suppose that the the wedge is vertical and contains 200 lines, and that the wedge will be rendered using 100 image colors. If continuous, the wedge would have 100 color blocks, each two lines thick, starting with color 0 and ending with color 99. If discrete, the wedge would have 5 color blocks, each 40 lines long, using colors 10, 30, 50, 69, and 89.

The following table shows the first 100 lines of the example wedge. Here, WL - wedge line, CO = continuous color, and DC = discrete color.

 WL  CO  DC        WL  CO  DC        WL  CO  DC        WL  CO  DC

  1   0  10	   26  12  10	     51  25  30	       76  37  30
  2   0  10	   27  13  10	     52  25  30	       77  38  30
  3   1  10	   28  13  10	     53  26  30	       78  38  30
  4   1  10	   29  14  10	     54  26  30	       79  39  30
  5   2  10	   30  14  10	     55  27  30	       80  39  30
  6   2  10	   31  15  10	     56  27  30	       81  40  50
  7   3  10	   32  15  10	     57  28  30	       82  40  50
  8   3  10	   33  16  10	     58  28  30	       83  41  50
  9   4  10	   34  16  10	     59  29  30	       84  41  50
 10   4  10	   35  17  10	     60  29  30	       85  42  50
 11   5  10	   36  17  10	     61  30  30	       86  42  50
 12   5  10	   37  18  10	     62  30  30	       87  43  50
 13   6  10	   38  18  10	     63  31  30	       88  43  50
 14   6  10	   39  19  10	     64  31  30	       89  44  50
 15   7  10	   40  19  10	     65  32  30	       90  44  50
 16   7  10	   41  20  30	     66  32  30	       91  45  50
 17   8  10	   42  20  30	     67  33  30	       92  45  50
 18   8  10	   43  21  30	     68  33  30	       93  46  50
 19   9  10	   44  21  30	     69  34  30	       94  46  50
 20   9  10	   45  22  30	     70  34  30	       95  47  50
 21  10  10	   46  22  30	     71  35  30	       96  47  50
 22  10  10	   47  23  30	     72  35  30	       97  48  50
 23  11  10	   48  23  30	     73  36  30	       98  48  50
 24  11  10	   49  24  30	     74  36  30	       99  49  50
 25  12  10	   50  24  30	     75  37  30	      100  49  50

Text annotation is drawn inside the wedge. Text will not be drawn unless it fits entirely within the wedge. For continuous wedges, this generally means that absolute minimum and maximum wedge colors cannot not be labeled, because half of the text label will extend beyond the edge of the wedge. Suppose the example wedge above was continuous and horizontal, and that labels would be drawn starting with value -5 with a step of 5. The annotated wedge would roughly look like

     +----------------------------------------------------------+
     |                                                          |
    -5     0     5    10    15    20    25    30    35    40    45
     |                                                          |
     +----------------------------------------------------------+

Note that labels for values -5 and 45 would extend beyond the limits of the wedge, and therefore would not be drawn. This problem does not occur with discrete wedges.

Wedges can be aligned vertically or horizontally and can run from left to right, right to left, top to bottom, or bottom to top. Optionally, an outline can be drawn around the outside of the wedge.

wedge can be run only when the X server is running. The X server is needed to get text width, based on text type and height.

PARAMETERS

master_file
This is a dataset with the same earth-location scheme as the images upon which the wedge is to placed. master_file can have either sensor or map projection based earth location. The default is Master.
wedge_lines
This is the height of the wedge, measured in pixel lines. There is no default. wedge_lines must be positive.
wedge_samples
This is the width of the wedge, measured in pixel sample. There is no default. wedge_lines must be positive.
wedge_dir
This parameter controls wedge direction. Valid responses are [up, down, left, right.]. The default when wedge_lines > wedge_samples is up. Otherwise the default is right.
text_height
This parameter defines the height of the text to be used in the wedge. The valid range is [12, 30]. The default is 18.
text_type
This parameter defines the type (font) of text to be used in the wedge. Valid responses are plain, bold, and italic.
two_color_text
This parameter determines whether or not text labels are drawn with two colors. If two_color_text=yes, the first half of the text labels are drawn with the first of two colors, and the second half of the labels are drawn with the second of two colors. (Note that these colors are symbolic; the actual colors are chosen when the wedge is rendered.) This is a useful alternative to using inverted color text labels, which often don't show up well near the middle of wedges. When rendering, two_color_text allows the user to choose a light label color over dark wedge areas, and a dark label color over light wedge areas.
line_offset
This parameter controls vertical wedge placement. If line_offset is non-negative, it specifies the number of pixels between the top of the image and the top of the wedge. If line_offset is negative, it specifies the number of pixels between the bottom of the wedge and the bottom of the image. Valid responses are any integer. The default is 0.
sample_offset
This parameter controls horizontal wedge placement. If sample_offset is non-negative, it specifies the number of pixels between the left edge of the image and the left edge of the wedge. If sample_offset is negative, it specifies the number of pixels between the right edge of the wedge and the right edge of the image. Valid responses are any integer. The default is 0.
scale_min
This is the minimum scale value used to display images over which the wedge is to be placed. It is a real number, and there is no default value.
scale_max
This is the maximum scale value used to display images over which the wedge is to be placed. It is a real number, and there is no default value. scale_max must be greater than scale_min.
invert_scale
This parameter determines whether or not the scale is inverted. This option was provided to work with the imscale function, which also has an invert_scale option. Valid responses are [yes, no]. The default is no. Note: the user should think carefully when using the invert_scale option along with the two_color_text option.
label_base
This is the real value of the first label. There is no default value.
label_step
This is the real increment between label values. There is no default value. label_step must be positive.
discrete_steps
This parameter determines whether or not the wedge uses discrete steps as opposed to continuous. Valid responses are [yes (discrete), no (continuous)]. The default is yes (discrete).
outline
This parameter determines whether or not an outline will be drawn around the wedge. Valid responses are [yes, no]. The default is no.
display
OPTIONAL. This is the name of the display on which the X server is running. Valid responses are typically of the form hostname:0. The default is :0.

EXAMPLES

This example represents the first example described in the Description section. The discrete option has been chosen in this example.

lapaz% wedge
output file    : char(255) ? [Wedge] wedge.two
master_file    : char(255) ? [Master] n11.93209.1136
wedge_lines    : int       ? 100
wedge_samples  : int       ? 400
wedge_dir      : char(  5) ? [right]
text_height    : int       ? [18] 14
text_type      : char(  6) ? [plain]
two_color_text : char(  3) ? [no] yes
line_offset    : int       ? [0]
sample_offset  : int       ? [0]
scale_min      : real      ? -5
scale_max      : real      ? 45
invert_scale   : char(  3) ? [no]
label_base     : real      ? [-5] 0
label_step     : real      ? 10
discrete_steps : char(  3) ? [yes]
outline        : char(  3) ? [no] yes
lapaz%

SEE ALSO

legend, imscale, xinject, xvu, cmdgraphics

NOTES

Color wedges only can be created via the wedge feature in xvu. So remember that if you would like value-assigned numbers in the wedge you create, this must be done at the command line with wedge.