5.0 Graphics Functions

5.1 GOF Graphics

The graphics overlay file (GOF) functions allow the user to draw graphics on the display and save graphics data to GOFs, edit data in existing GOFs, and load graphics data from GOFs. Refer to the LAS Programmer's Guide in the section on Associated File Formats for more information on the format of GOFs.

Before the user can begin processing graphics data, the type of graphics data must be selected. The user may also opt to modify the default graphics overlay file name before the operation to be performed is selected. The following types of graphics data are supported:

  1. Points
  2. Lines
  3. Polygons (including rectangles)
  4. Annotation (text)

Next, the processing mode must be selected. There are 3 processing modes available:

  1. Select
  2. Load
  3. Edit

Described below are the instructions for processing in each of the 3 modes.

Selecting Graphics Data:

Once the type and mode have been selected, the user may enter a label to be associated with the graphics element. This label must be entered before the graphics element is selected. If it is not, the user must use edit mode to add a label. The color, line width, and font may be specified before or after the graphics element is selected. Attributes may also be defined and/or set either before or after the graphics element is selected.

The following descriptions for selecting graphics data refer frequently to the image. Keep in mind that the image may be the main image, the full resolution image, or the zoomed image. The user may switch between the different images at any time while in the process of selecting graphics data.

For point data, the user need only select the desired point in the image using the left mouse button. An outline showing the extent of the label is then displayed and the user may use the left mouse button to place the label. The label can be changed (but not added), the color and font can be changed, and attributes can be added or changed until the user selects the next graphics type from the graphics type icons. As soon as the next graphics type is selected, the current point is written to the GOF.

For line or polygon data, the user must select each vertex of the line or polygon using the left mouse button. An outline or shadow of the line segment is displayed before it is selected to show the user where the line segment will be drawn. The middle mouse button can be used to erase the previous line segment and the right mouse button to end selection of the line. An outline showing the extent of the label is then displayed and the user may use the left mouse button to place the label. The line or polygon label can be changed (but not added), the color, font, and line width can be changed, and attributes can be added or changed until the user selects the next graphics type from the graphics type icons. As soon as the next graphics type is selected, the current line or polygon is written to the GOF.

The rectangle is a special case of the polygon graphics data. To select a rectangle, use the left mouse button to select the upper left corner of the rectangle. An outline showing the width and height of the rectangle is then drawn. The user must now select the lower right corner of the rectangle using the left mouse button and proceed as with a line or polygon data.

For annotation data, the user must first enter an annotation text string. Note that when the annotation text graphics type is selected, the label field becomes a text field. An outline showing the extent of the text string is displayed and the user must use the left mouse button to place the text on the image. The annotation text, color, and font can be changed, and attributes can be added or changed until the user selects the next graphics type from the graphics type icons. As soon as the next graphics type is selected, the current annotation element is written to the GOF.

Loading Graphics Data:
To load graphics data, the user must simply select the graphics type, modify the GOF name if necessary, and select the load button. The graphics data are then read from the GOF and drawn over the displayed image. If the GOF was created in XID, the graphics elements will retain the same color, line width, and font as they were created with. If the GOF was not created in XID, the graphics elements will be displayed with the first color, line width, and font from the corresponding option menus. The graphics elements are drawn over the main image window, the full resolution window, and the zoom window.
Editting Graphics Data:
For instructions on editing graphics data see section 5.4.
Graphics Type Icons:
Select the type of graphics data to be processed. From top to bottom, the icons represent the following graphics types:

The select, load, and edit radio buttons allow the user to select the graphics operation to be performed.

Select:
Draw the selected type of graphics elements.

Load:
Load the selected type of graphics from the specified GOF.

Edit:
Modify the selected type of graphics element. See section 5.4 for more information on editting graphics data.
Color:
Select the color for the current graphics element. The user may choose from one of eight predefined colors (black, white, red, green, blue, yellow, magenta, or cyan). If the user wishes to select from a different set of colors, place a file named .xid_colors in the root directory of the login account containing the desired color names (one name per line). The default color is the first color listed on the option menu. For a list of available colors, run the pseudocolor mapping function and choose the color list option (see section 4.3.4). If more than eight colors are specified in the file, the extra colors will be ignored. If fewer than eight colors are specified, the remaining colors will be set to the original defaults.

Line Width:
Select the line width for the current graphics element. Line width is only applicable for line, rectangle, and polygon data. Valid line widths are 1 through 5 pixels with a default of 1.

Font:
Select the font for the label of the point, line, rectangle, or polygon data or for the text of the annotation data. The user may choose from one of nine predefined fonts. If the user wishes to select from a different set of fonts, place a file named .xid_fonts in the root directory of the login account containing the desired font names (one name per line). The default font is the first font listed on the option menu. To determine the available fonts on a system, run the function xlsfonts. If more than nine fonts are specified in the file, the extra font names will be ignored. If fewer than nine fonts are specified, the remaining fonts will be set to the original defaults.

Define Attributes:
Define attribute names for the current graphics overlay file. See section 5.2 for more information on defining attributes.

Set Attributes:
Set attribute values for the current graphics element. See section 5.3 for more information on setting attribute values.

Label:
To enter the graphics element label, the user needs to click on the button marked Label. The window below will popup and the user can then enter the label.

A graphics element label can be entered for points, lines, rectangles, or polygons. The label may contain up to 12 characters and the label must be entered before selection of the graphics element begins. If it is not, the user may add a label by entering edit mode.

Text:
To enter text for annotation graphic elements, the user needs to click on the button marked Text. The window below will popup and the user can then enter the text.

The annotation text may contain up to 508 characters.

GOF:
To enter the name of a GOF, the user needs to click on the button marked GOF. The window below will popup and the user can then enter the GOF name.

Enter the name of the GOF to be processed (i.e., loaded, edited, or written to). By default, the GOF to be processed is associated with the currently displayed image.

Refresh:
Clear the image windows and redraw the graphics data.

Dismiss:
Close the graphics panel.