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.

New Feature

Convey the projection coordinates of a GOF on an image of one resolution to another image over the same geographic area of another resolution. For example, convert a GOF on 30 meter resolution image to a 15 meter image.
Option 1: Create new GOF
Steps to create identical cutlines (same geographic location) over the same geographic location of different resolution imagery:
1. Open one of the images in XID
2. Click menu Graphics->GOFs
3. Select the graphics type, press the "Select" button
ATTENTION: If you want to edit this GOF later, DO NOT toggle the save a portable GOF button, after editing is done, use it as existing.
4. Select the toggle to save a portable GOF
5. Create the cutline with the graphics utility
6. A regular and portable GOF file for this image will be saved automatically

ATTENTION: After creating this GOF file, you can not make changes with the toggled save button. Which means, if you want to make changes, toggle on the save buttong, just do the changes as before, don't mix up with this transimission. After make the GOF ready, use it as EXISTING.
7.(A.) Open the next resolution image (that is over the same area) in XID
8.(B.) Load the portable GOF (specify the name with the first image's basename)
9.(C.) Click lower Load button, a regular GOF for this image will be saved automatically after loading the portable GOF

10.(A.) Open the next resolution image (that is over the same area) in XID
11.(B.) Load the portable GOF (specify the name with the first image's basename)
12.(C.) Click Lower Load button, a regular GOF for this image will be saved automatically after loading the portable GOF

Repeat steps A-C for each resolution image over the area that you wish to apply the cutline to.

Use the automatically generated regular GOF cutline files then for further
processing of each resolution of the image.


Option 2: using existing GOF file
ATTENTION: Make the GOF READY before doing the following, which means if you do the follwoing, don't try to EDIT the GOF at the same time
In order to create a portable gof from an existing gof file, you must load that gof file first, follow next steps
1. Load one of the images in XID (e.g., the 30 meter resolution image)
2. Click Graphics->GOFs
3. In the X Image Display - Graphics window, click the button to select the graphics type (e.g. poly, rect), change the GOF file name and portable GOF file if necessary.
4. Toggle the Save Portable GOF button
5. Click Load botton on the upper panel to load existing gof file

After these 5 steps, the existing GOF will be loaded to the main window, also created a portable gof file.
Follow the next steps to load the portable GOF to another resolution window.
6.Initialize the window to get rid of the GOF.(Display->Initialize, on X Image Display-Init window, click Plane button, click the circle on the right, till get G in the text box, then click Apply button)
7.Load another image in different resolution at the same area (e.g., the 15 meter resolution image)
8.Click menu Graphics->GOFs
9. In X Image Display-Graphis window, click the button to select the graphics type (e.g. poly, rect), change the GOF file name (will be created) and existing portable GOF file if necessary.
10.Click the lower Load button to load the portable GOF.

After these steps, the GOF file will be created and the GOF will be displayed in the main window with right resolution.

*Portable GOF file :- Temporary file which stores the polygon vertices in projection coordinates. It can then be opened on another image over the same geographic area of another resolution to view that same cutline over the new image. Then the user will have to save a traditional GOF cutline file from XID to save the lines/samples of the polygon vertices of the new image in a cutline GOF for further processing.