13

Reusing Legends and Styles

Manipulating Legends

In addition to the ability to control the content and appearance of the legend, and the ability via manipulation of legend entries to control the content and appearance of the map window, there is a set of tools designed to allow you to manage legends on another level. With these tools you organize and control legends by naming, renaming, and deleting them. You are provided with tools that allow you to organize and delete legends, and commands that allow you to replace one legend with another.

It is important to keep two aspects of legend management straight. First, each map window you open has its own legend. You can have as many map windows open in a workspace as you desire. While each map window is dependent on its own legend, every legend and its map window form an independent entity, distinct from all other legend/map window pairs contained in the GeoWorkspace.

This feature has many implications for workflow design. Although two open map windows may each contain a legend with an entry for the same feature class, that feature class (or query or thematic) may behave differently in each map window. The symbology of the graphics can be different in each map window, as can scale settings, locatability, title, and so on. Likewise, each map window contains configurable display parameters independent of all other map windows. This topic is covered in Chapter 8.

On a higher level, superseding the unique one-to-one relationship of a map window and a legend is the relationship of named legends and the GeoWorkspace. Legends can be saved by naming them. Named legends are stored in the workspace. The workspace may contain none, one, or many named legends. By virtue of the fact that legends live in the workspace, they become candidate legends for any open map window. That is, any active legend can be replaced by another legend previously named and stored in the workspace. The ability to save and interchange legends carries with it another set of implications for workflow design and management, discussed in material to follow.

Controlling Legend Display

You know by now that every map window, by default, comes with a projection and a legend. GeoMedia gives you the option of displaying the legend window or turning its display off. The View drop-down on the Main Menu bar contains an entry that controls display of the legend, as does the pop-up menu associated with a right mouse click in the map window. These features are shown in the following illustration. When the Legend entry is checked, the legend is visible in the map window. When it is toggled off, its display is suppressed.
 
 

hgm13_1.gif

hgm13_2.gif

3 TIP: The functionality associated with legends and legend entries is not affected by the display status of the legend. In other words, even if a legend display is turned off you can still work with legend properties or legend entry properties, add or delete feature classes from the map window (and therefore from the legend), and perform any task associated with legend functionality from the Legend menu. Turning the legend display off deprives you of the interactive functions the legend provides. Naming Legends

Legends are saved in the GeoWorkspace. One legend per map window is stored, by default, when you save your workspace. Although the legend is always written to the workspace when it is saved, naming legends during your workflow allows you to maintain a collection of legends that can be recalled as the requirements of your workflow warrant. Naming legends allows you to reuse not only legend entry symbology but analytic procedures such as queries and thematic displays.

For example, say your workflow centers around census block analysis. You could create a thematic display that shows ranges of a particular attribute. Naming the legend that contains the thematic display allows you to apply the same analysis, via that legend, to any number of map windows containing census block information. Whenever you apply the named legend to a new set of block information, the same thematic divisions are applied and displayed.

Because GeoMedia applies queries dynamically, using a named legend that includes a query effectively reruns that query against the warehouse data and displays the current results. This is a very powerful feature when working with dynamic databases.

The Name Legend dialog always pertains to the legend in the active map window. The dialog is accessed by clicking on Legend > Name Legend on the Main Menu bar. Naming a legend is simply a matter of typing a new name in the dialog. Selecting a name from the drop-down list overwrites that named legend with the content of the legend in the active map window. You also have the option of letting the name default to Legend1, Legend2, and so on.

Managing Legends

Managing legends is accomplished in the Legend > Legends dialog. This dialog, while apparently quite simple, can be a bit confusing. Part of the dialog, Map Window Legends, pertains to the legends in the map window. Another part, Named Legends, pertains to the content of named legends.

The Properties button always takes you to the Legend Properties dialog. The Organizer button allows you to manage named legends. The Replace button, which is context sensitive with reference to the active map window, allows you to switch to a different legend. The Legends dialog, shown in the illustration at left, contains three components: <Empty>, Map Window Legends, and Named Legends. The sections that follow describe the content of these components.

Empty Legend

The <Empty> entry is the default legend for a new workspace and contains no legend entries. When the Empty legend entry is selected to replace the current legend, the map window is cleared of all existing graphics. You will be warned that the existing legend will be lost if it is not named and saved before it is replaced.

Map Window Legends

The plus symbol in a box and the text "Map Window Legends" in the Legends dialog refers to the legends in each of the currently open map windows on your computer screen. The tree listing under Map Window Legends contains the names of your open map windows. Those map windows may have names you have given them in the Window > Map Window Properties dialog (see Chapter 8), or they may by default be named MapWindow1, MapWindow2, and so on. Map window legends are shown in the following illustration.

ORIGINAL GRAPHIC ig090013

In the previous illustration, the expanded Map Window Legends tree contains two entries. These are the names of the two map windows in the GeoMedia application window. They are not the names of the legends. The map window on the left is the active map window and is named Madison County Lite. The map window on the right has not been named and is referred to, by default, as MapWindow1.

Each map window contains what is in effect a local copy of a named legend. When a named legend is added to a map window, changes made to legend when it is the active map window legend have no effect on the original named legend unless you save the revised legend under the same name. Conversely, any changes made to the named legend are not reflected in your map window legend unless you "reselect" (with the Replace command in this dialog) the changed named legend.

The Properties button is the only command available when a map window legend is highlighted. (The Organizer button is available regardless of context. However, its functionality, discussed in material that follows, has nothing to do with map window legends.)

Selecting either of the map window names and clicking on Properties takes you to the Entries tab of the Legend Properties for that window’s legend. You are not, however, making changes to the named legend. Even if the map window is based on a named legend, you will not "see" the legend’s name, nor will any changes you make be reflected in the named legend unless you explicitly resaved the legend using Legend > Name Legend. When you "replace" a named legend, you will be prompted to confirm overwriting the named legend.

Named Legends

The Named Legends tree, shown in the illustration at left, will contain any legends you have named in the Legend > Name Legend dialog. This workspace contains two named legends. Madison County is the legend used to build the graphics in MapWindow1 (previous illustration), and the Roads and Bridges legend was used for the Madison County Lite map window. Although, in this example, named legends were used for both open map windows, there is no requirement that any map window has to be based on a named legend. In other words, you may have many named legends in your workspace, none of which are relevant to your current workflow.

Legend Properties

The Properties button runs the Legend Properties dialog. You select the map window or the named legend of interest and click on the Properties button. Changes made to a named legend in the Properties dialog are not reflected in your map window unless you replace the map window legend with the named legend. Any changes you make to an active map window legend are not automatically reflected in the named legend with which you started. If you want the original named legend to reflect any changes you have made in the map window, you will need to save the map window with the same name you previously gave the named legend. This effectively replaces the original named legend with the one in the current window.

As shown in the illustration that follows, all legend entries for the Madison County named legend are flagged as "Data is not loaded." The symbol for this is the circle with the diagonal bar. The legend entry properties for a named legend can be changed, in spite of the fact that they are considered to be in a non-normal state. However, those changes are not reflected in your map window until you replace the map window legend with the named legend.

NOTE: This is not the case for legend entries in an active map window legend. You cannot modify an active legend entry unless it is in a normal state. ORIGINAL GRAPHIC ig090015

Replacing Legends

It is possible to make sweeping changes in a map window by using the Replace button. The Replace command is available only when a named legend is selected in the Legends dialog. If you replace a current map window legend with a different named legend, all feature classes, styles, priorities, and so on that were present will be replaced by a copy of those that are stored in the named legend. This can be a very powerful way to dynamically switch from one set of features and display characteristics to another.

There are two important points regarding Replace functionality. First, this command is context sensitive. Replace will replace the legend in the active map window with the selected named legend. The catch is that while the Legends dialog is running, it takes the focus. Taking the focus is a Microsoft term that means that the legend window is now the "active" window on the computer screen (i.e., the active window has the highlighted bar at the top) and, while the legend window is the highlighted one, you cannot tell which map window is active. Be sure that you know which map window is the active one before going into the legend dialog. To confirm that you are replacing the correct legend you have to dismiss the Legend dialog, at which time the focus will return to whichever map window is active.

The second point to consider is the fate of the legend being replaced. You are reminded via a warning dialog that the current legend will be lost, and you are given the opportunity to save it, by naming it, before you replace it with a new legend. If you made changes to the map window legend and want to preserve them, the legend must be named before you replace it.

Legend Organizer

The Legend Organizer dialog, shown in the illustration at left, provides you with the ability to rename and delete named legends. In the Named Legends box you are provided with a list of all named legends in the GeoWorkspace. A potential point of confusion in this dialog revolves around the Organizer button. It is active in this dialog regardless of what has been selected in the Legends window, but in fact its functionality operates only in respect to named legends.

Workflow 13-1:
Managing Legends

Naming legends allows you to save and reuse map window displays you have developed. Legends are saved in the GeoWorkspace. Naming legends is one way to "keep" your thematic displays. Different legends can be assigned to each map window you have open, providing you with simultaneous but different views into your data.

You need access to both a GeoWorkspace and a warehouse to complete this workflow exercise. Make sure you have access to IGM4.gws and Louisiana.mdb.. This workspace contains a connection to the Louisiana warehouse in the C:warehouses directory. If your warehouses reside in another location, you need to edit the connection. See workflow 5-2 if you need instructions for modifying the connection. This workspace contains two named legends: county population and median female age. When the workspace is open, you should have the county population thematic displayed in the map window. You will create a third legend, Cities and Population. To create this legend, perform the following steps.

1. Open a new map window.

2. Select a legend name for the new map window.  On the Main Menu bar, click on Window > New Map Window. Click on median female age. Click on OK. <Empty> is the default legend and is always available.

ORIGINAL GRAPHIC ig090016a 3. Tile the windows, as shown in the following illustration. You may need to collapse the legend entry and fit the maps to their respective windows.  On the Main Menu bar, click on Window > Tile Vertically.

4. Review legend properties. On the Main Menu bar, click on Legend > Legends. Expand the MapWindow Legends and Named Legends listings. Select median female age under Named Legends. Click on the Properties tab. The named legends have simply been copied to MapWindow1 and MapWindow2.
 

NOTE: It is important to remember that named legends exist independently of map window legends. Changes made to the legend in the map window are not automatically made to the named legend, and vice versa. Changes made into a Named Legend will not be reflected in the map window associated with that legend until a new window is opened using the named legend. Note that the Entries record for the named legend carries the key that indicates that the data is not loaded. In spite of this, the named legend can be modified.
  5. Modify the legend properties for the map window legend. Select MapWindow2 > Properties. Type in the new title median female age. This update is made to the map window legend.

6. Modify the legend properties for a named legend. In the Title field, change the legend title to median female age. Click on OK. Changes to the named legend are not made in the map window.

7. Create a new legend. Add the cities feature class to the legend in MapWindow1.

8. Rename or delete named legends. Click on Organizer in the Legends box.

9. Change the legend in the map window. The Replace option is available only when you select a named legend or the empty legend. The named legend chosen will replace the legend in the active map window.

10. Save the new legend. On the Main Menu bar click on Legend > Name Legend. Type in Population and Cities. You can now open a new map window using the legend you just created.

Be sure to check that the appropriate map window is the active one. The active window will have the top bar highlighted. Usually it is blue, whereas active windows are gray (but keep in mind that this color scheme can be user defined). The map window containing the new legend is shown in the following illustration.

ORIGINAL GRAPHIC ig090019
 
 

Master Legend

Every GeoWorkspace contains a Master Legend, which serves as the template for all feature class display for all legends in a workspace. The Master Legend dialog, shown in the following illustration, is accessed from the Legend > Master Legend menu on the Main Menu bar.

ORIGINAL GRAPHIC ig090017

When a feature class is added to a map window, GeoMedia follows a search path to find out how to display the feature class. It first checks for a legend entry in the active legend. If none exists, it checks with the Master Legend. The Master Legend is the resource of last resort. The Master Legend knows about all the feature classes in all connected warehouses. It provides the map window legend with a set of default symbology and legend entry attributes for all feature classes whose display parameters have not been defined in a saved legend.

Two points are worth reviewing here. First, GeoMedia does not honor the symbology of graphics defined in the source data warehouse. In the absence of a named legend containing an entry for a given feature class, the legend looks to the Master Legend for display symbology. Second, the display symbology used in the GeoMedia application window has no affect on the source data. Changes made to map objects occur exclusively in the map window.

There are basically two approaches for working with the Master Legend. The Master Legend contains the legend defaults for all feature classes in all connections. You can work with the defaults as defined in the Master Legend or you can go into the Master Legend and specify your own legend entry defaults. In the first case, you can allow feature classes to be added to the legend with the default properties specified in the Master Legend, then customize them later via the Legend Properties dialog. In the second case, you have the option of changing the defaults for your feature classes in the Master Legend before they are added to the legend.

NOTE: Changes made to a legend entry with the Legend Properties dialog are not applied to the feature class defaults in the Master Legend. The Master Legend is not dynamically connected to legend symbology changes made through that dialog. Therefore, even though you have changed display parameters for a feature class, unless you save the GeoWorkspace or name the legend in which the entry resides, the next time you add the feature class to a legend it will display with whatever defaults are contained in the Master Legend. Master Legend defaults are as follows. The title of the legend entry is the feature class name. Display mode is On. The entry is locatable and is displayed in the legend. The style key is dictated by the geometry type of the class, and color is assigned by cycling through the color table.

The connections for the sample application window are shown as trees in the "Feature classes" box in the right side of the Master Legend dialog. When a connection listing is expanded, all feature classes within it are available for selection. You can change any of the display parameters, as described in the previous discussion of legend properties.

Tip: GeoWorkspaces that contain predefined Master Legends can be saved as workspace templates, allowing other workflows and other users access to common symbology.

Workflow 13-2:
Using the Master Legend

The Master Legend, stored in the GeoWorkspace, is used to determine the default symbology associated with the feature classes in your connected warehouses. When a feature class is added to the map window, GeoMedia looks to the Master Legend for its color, line style, area fill, patterning, and so on. If the class has been predefined, that symbology is used. If the feature class has  not been predefined in the Master Legend, GeoMedia creates a default entry for the class. Creating Master Legend entries uses the Legend Properties Style dialog.

2NOTE: GeoMedia knows nothing about the symbology associated with the feature class in the source warehouse. Changes made to the Master Legend do not affect feature classes added to the map window before the changes were made. If you close the map window and open a new one, however, the changes will apply. To use the Master Legend, perform the following steps. 1. Open a new GeoWorkspace and connect to the tgr05143 warehouse. Add all TIGER feature classes to the legend. Because the default styles are being automatically applied, your map styles will probably not be what you want for your final result. Delete all feature classes from your legend.

2. Select a feature class to enter in the Master Legend. Expand the listing for your connection by clicking on the plus sign. Highlight tiger_boundary. The default legend properties for the feature are displayed, as shown in the following illustration.

ORIGINAL GRAPHIC ig090018a 3. Set up default feature class symbology. On the Main Menu bar, click on Legend > Master Legend.

4. Set up default feature class symbology. Change the Legend entry Title to boundary, and enter tiger as the Subtitle. Click on the Style button to go to the Style Definition dialog. Using the style dialogs, create feature styles you find pleasing.

5. Repeat steps 1 through 3 for each of the features in the Tiger warehouse. Add the feature classes to the legend. Every time you use this workspace, GeoMedia will use the symbology you have just assigned. The legend entries containing Master Legend symbology are shown in the following illustration.

ORIGINAL GRAPHIC ig090018b

This section has covered the use of the Legend function as the key to composing maps in GeoMedia. The Legend options provide you with the tools to create professional-quality maps that communicate the results of your work to others.