Note: this help page uses the spelling "color". Depending on the branding of your
SNAP application, your application may have the spelling "colour"
Overview
A color bar legend is a representation of the color palette and it's associated scene product values. There
are two separate but interrelated tools for creating color bar legends: one adds the legend as a layer on a scene image, the
other exports the legend as its own file. A single preferences
page is available which governs both of these tools. (Note: color bars can only be created for non-RGB images.)
The 3 Tools ("Color Bar Legend Layer Tool", "Color Bar Legend Export Tool", and "Color Bar Legend Preferences") all share almost the same fields
so they are all consolidated here in this single help page, with notation regarding any fields which not applicable to
all tools.
Color Bar Legend Layer Tool: To add a Color Bar Layer, toggle the color bar Layer Tool select "/Layer/Color Bar Legend". The "Layer Editor" is used
for editing the Color Bar parameters (inside the Layer Manager click "ColorBar" and then the pencil icon).
Color Bar Legend Export Tool: To open the color bar Export Tool select "/File/Export/Other/Color Bar Legend" or from with the scene image right-click
and select "Color Bar Legend"
For the Color Bar File Export tool, if a Color Bar layer already exists, then the Color Bar Export Tool will use the
same initial settings as the layer image. If there is no layer then the initial settings come from the preferences.
Color Bar Legend Preferences: To open the color bar legend preferences window select "/Tools/Options/Color Bar Legend"
from the main menu (Note: this may be located instead in File/Preferences on the Mac).
Title / Units Text
These fields are the text to be placed as the title and units of the color bar legend.
(Note: these fields are NOT located in the Preferences as they are band dependent.)
-
Title Text: The text to be placed as the title of the color bar.
This field gets auto-populated
based on the band's name and does not have an associated preferences value. To format the title font,
use the "Title Format" section in this same tool window.
-
Units Text: The text to be placed for the units in the title section of the color bar.
This field gets auto-populated
based on the band's units and does not have an associated preferences value. To format the units font,
use the "Units Format" section in this same tool window.
Orientation
These fields set the orientation parameters of the color bar legend.
-
Alignment: Sets the alignment of the color bar to either vertical or horizontal
-
Title Anchor: (for VERTICAL ALIGNMENT ONLY) Sets the location of the title on the color bar if
alignment is vertical.
-
Reverse Palette & Labels: Reverses the direction of the palette along with it's labels.
Tick Label Values
These fields determine the actual data values and data formatting to use for the tick marks labels.
-
Label Value Mode: Sets the actual data values of the labels
-
Generated Values: The values will be auto-generated based on the number of desired
tick marks as specified in the "Label Count" textfield in this section.
-
Entered Values: The values used are manually entered in the "Label Values" textfield.
-
Palette Values: Values will be used which are in the palette definition file.
-
Label Count: The desired number of tick marks to be auto-generated onto the color bar
(only used for Mode: "Generated Values").
-
Label Values: The values are manually entered here when in mode "Entered Values".
The labels are placed in the corresponding data location on the color bar.
In this mode values will appear with data format exactly as they are entered and no decimal
place adjustments occur.
You may use the following value-text pairs syntax to use custom text to represent numbers:
"{NUMBER}:{TEXT}, NUMBER:{TEXT}", (For example "Label Values" = "0.01:low, 1.0:medium, 20.0:high")
-
Auto-Fill Label Values Textfield: Auto-populate the Label Values field with the generated values. This is useful
is you wish to edit the auto-generated values, but it has the side effect of causing the other entry textfields
of the Color Bar Legend Tool entry form to be wide.
-
Label Scaling: A multiplier to apply to the displayed label value. Note that using
a value not equal to "1.0" will essentially change your units and you may wish to adjust
your "Units Text" accordingly.
For example: if the raw data value is 0.001 and units are meters,
then setting "Label Scaling" = "1000" will display the data as "1" on the color bar, and then you
correspondingly specify "Units Text" = "(millimeters)".
-
Decimal Places: The decimal places to use (Note: does not apply to Mode = "Entered Values")
-
Force Trailing Decimal Zeros: Force the full decimal places by adding all trailing zeros instead of truncating.
For example if "Trailing Decimal Places" is selected and "Decimal Places" = "2" then the raw data value "0.2"
will be displayed as "0.20" instead of "0.2". (Note: does not apply to "Mode" = "Entered Values")
-
Weight Tolerance: Weight tolerance to keep desired auto-generated values on the ends of the color bar.
This is primarily needed when the color palette has been defined based on the statistics of the band (see the
Color Manipulation Tool for defining color palettes). This is also needed if your palette has been defined
to a greater decimal precision than the request display "Decimal Places" of your color bar legend.
Color palettes defined based on the statistics of the band
will tend to have values which requires a lot of decimal places to display. Subsequently when the points on the
color bar legend are auto-generated, the end-points can in many cases not actually be on the color bar due to rounding
caused by decimal point specification. This weight tolerance enables the auto-generated end-point labels to stay on
the color bar. For example a weight tolerance = ".01" would keep any labels on the color bar which are off by 1%
of the value spread across the min/max of the color bar.
Placement Location (LAYER TOOL ONLY)
These fields set the placement location anchor of the color bar image legend on the scene image.
-
Place Color Bar Inside Image: (LAYER TOOL ONLY) Place color bar inside/outside scene image bounds.
-
Scene Anchor: (LAYER TOOL ONLY) Where to place color bar legend on the scene image.
-
Scene Anchor Offset: (LAYER TOOL ONLY) Move color bar legend away from anchored axis (by percentage of color bar height).
For a horizontal color bar legend the positive direction is upward.
For a vertical color bar legend the positive direction is leftward.
-
Scene Anchor Shift: (LAYER TOOL ONLY) Move color bar legend along the anchored axis (by percentage of color bar width).
For a horizontal color bar legend the positive direction is rightward.
For a vertical color bar legend the positive direction is upward.
Size and Scaling
These fields set the size of the color bar and the size scaling onto the view window scene.
-
Scale to Scene Size: (LAYER TOOL ONLY) Resizes the full legend image to a percentage of the size view window image scene
(as specified in the "Legend Scaling Factor" textfield.
-
Scene Size Scaling: (LAYER TOOL ONLY) Percent to scale color bar legend image length to the view window image scene.
-
Scale to File Size: (EXPORT TOOL ONLY) Resizes the full legend image to the size specified in the textfield "Legend Size".
-
File Size: (EXPORT TOOL ONLY) Width (in pixels) of legend image file (height if vertical image) if "Scale to File Size" has been selected.
-
Color Bar Length: This is the length (in pixels) of the color bar (just the color bar itself and
not the full color bar legend image.
-
Color Bar Width: This is the width/thickness (in pixels) of the color bar (just the color bar itself and
not the full color bar legend image.
Title Format
These fields specify the formatting to apply to the "Title Text".
-
Show Title: Whether or not to display the "Title Text" on the color bar legend image.
-
Title Size: The font size (in pixels) of the "Title Text".
-
Title Font Bold: Apply font bold to "Title Text".
-
Title Font Italic: Apply font italic to "Title Text".
-
Title Font: Specifies the font-face to use for "Title Text" (very limited selection).
-
Title Color: The font color to apply to "Title Text".
Units Format
These fields specify the formatting to apply to the "Units Text".
-
Show Units: Whether or not to display the "Units Text" on the color bar legend image.
-
Units Size: The font size (in pixels) of the "Units Text".
-
Units Font Bold: Apply font bold to "Units Text".
-
Units Font Italic: Apply font italic to "Units Text".
-
Units Font: Specifies the font-face to use for "Units Text" (very limited selection).
-
Units Color: The font color to apply to "Units Text".
Tick Label Format
These fields specify the font formatting to apply to the tick mark labels.
-
Show Tick Labels: Whether or not to display the tick mark labels on the color bar legend image.
-
Labels Size: The font size (in pixels) of the tick mark labels.
-
Labels Font Bold: Apply font bold to tick mark labels.
-
Labels Font Italic: Apply font italic to tick mark labels.
-
Labels Font: Specifies the font-face to use for the tick mark labels (very limited selection).
-
Labels Color: The font color to apply to tick mark labels.
Tick Marks
These fields specify the formatting to apply to the tick marks.
-
Show Tick Marks: Whether or not to display the tick marks on the color bar legend image.
-
Tick Length: Length (in pixels) of each tick mark.
-
Tick Width: Width (in pixels) of each tick mark.
-
Tick Color: Color of each tick mark.
Palette Border
These fields specify the formatting to apply to the palette border (the border around the color bar, not
the border around the full image).
-
Show Palette Border: Display a border around the palette (color bar) image.
-
Palette Border Width: Width of palette (color bar) border line.
-
Border Color: Color of the palette (color bar) border line.
Legend Border
These fields specify the formatting to apply to the legend border (the border around the full image, not
the border around the color bar).
-
Show Legend Border: Whether or not to display the legend border.
-
Legend Width: Width of border line around the full legend.
-
Legend Color: Color of the border line around the full legend.
Legend Backdrop
These fields specify the formatting to apply to the legend backdrop (background of full image).
-
Show Backdrop: Whether or not to display the backdrop on the color bar legend image.
-
Backdrop Trans: Transparency of the legend backdrop.
-
Backdrop Color: Color of the legend backdrop.
Colors Override (EXPORT TOOL ONLY)
-
Black/White Color Override:Overrides all color fields with a black letters on white background color scheme.
This exists to enable a different (but generic) default color setup for the Color Bar Export Tool than the Color Bar Layer Tool.
Color Bar Export Tool (PREFERENCES TOOL ONLY)
-
Show Editor:This configuration when TRUE displays the editor GUI first when you use the "Export
Color Bar Legend" tool. Otherwise you get a file selector GUI and may access the editor GUI through the "Properties"
button on the file selector GUI.
Restore (PREFERENCES TOOL ONLY)
-
Default (Color Bar Legend Preferences):Restores all preferences parameters within the Color Bar Legend
Preferences to the original default values.