Exercise 6: Creating annotation

Complexity: Beginner Data Requirement: ArcGIS Tutorial Data Setup Goal: Label features based on subtypes and dimensions. Convert labels to annotation.

In Exercise 1: Organizing your data in the Catalog, you browsed through the existing feature classes in the Montgomery geodatabase. One of these feature classes contained annotation that was linked to features in the Distribmains feature classes. You then imported the water laterals from a coverage into the Water feature dataset. Now you will create labels for the water laterals in ArcMap and convert them to an annotation feature class that is linked to the laterals.

Creating labels for the lateral subtypes

Start ArcMap and add the Laterals feature class.

Steps:
  1. Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.
  2. Set the Montgomery geodatabase as your default, since this is the geodatabase you will use in this tutorial. To do this, click the browse button on the ArcMap - Getting Started dialog box.

    Set the default geodatabase for the map.

  3. Navigate to the location of the BuildingaGeodatabase tutorial folder, select the Montgomery geodatabase, then click Add.
  4. Click OK to open a new, empty map.
  5. Click the Catalog window button Catalog Window on the Standard toolbar to open the Catalog window.
  6. Navigate to the Montgomery geodatabase in the Catalog window.
  7. Expand the Water feature dataset.
  8. Click the Laterals feature class, hold down the left mouse button, and drag the feature class from the Catalog window onto the ArcMap window.
  9. Because you created subtypes for the Laterals feature class, each subtype is automatically drawn with unique symbols. You will create different label classes for the subtypes.

  10. Right-click the Laterals feature class in the ArcMap table of contents and click Properties.

    The Layer Properties dialog box opens.

  11. Click the Labels tab.
  12. Check the box to Label features in this layer.
  13. Click the Method drop-down arrow and click Define classes of features and label each class differently.
  14. Click Get Symbol Classes.

Now the layer has several label classes defined—one for each subtype and one for other values.

Leave the Layer Properties dialog box open; you will use it in the next section.

Defining the labels for the hydrant laterals

The different subtypes of laterals have different roles in the water system. For example, service laterals bring water from the distribution mains to residences or businesses, and hydrant laterals bring water from mains to fire hydrants. You will make the labels for the hydrant laterals red to make it easy for map readers to differentiate hydrant laterals from other laterals.

Steps:
  1. Click the Class drop-down list on the Labels tab of the Layer Properties dialog box and click Hydrant laterals.
  2. Click the text color drop-down arrow and choose a red swatch from the palette.
  3. Click the bold, B, and italic, I, buttons.
  4. Click Expression.

    The Label Expression dialog box opens.

  5. Sometimes you want to label features with the content of a single field. The Label Field drop-down list lets you select a single field with which to label features. At other times, you may want to create more complex labels. The Label Expression dialog box lets you construct labels by concatenating one or more fields and other text. You can also add logic to the label expression using a script.

    To create the labels for the hydrant laterals, you will load a label expression that has been saved to a file.

  6. Click Load.

    This opens a dialog box that allows you to navigate to the file you want to load.

  7. Navigate to the Layers folder in the BuildingaGeodatabase tutorial folder.
  8. Choose the lateral_exp.lxp file and click Open.
  9. This script expression evaluates the length of each lateral; if its value is greater than 200, it labels the lateral with the contents of the DIAMETER field, a space, and the contents of the MATERIAL field. If the length is less than 200, it labels the lateral with the contents of the DIAMETER field.

    You will adjust this expression for the Hydrant laterals so that Hydrant laterals longer than 100 feet get the more complete labels.

  10. Click in the Expression box on the Label Expression dialog box and change the value in the If statement from 200 to 100.
  11. Click Verify.

    The expression is tested, and a sample is displayed.

  12. Click OK on the Label Expression Verification dialog box to close it.
  13. Click OK on the Label Expression dialog box.

    You have created an expression for the Hydrant laterals label class.

  14. Click Apply on the Layer Properties Layers tab to apply your changes.

Next, you will create expressions for the label classes of the other subtypes.

Defining the labels for the service laterals

The service laterals tend to be shorter than the hydrant laterals. For this exercise, it is only important to show their material type when they are longer than 200 feet, so you will load the label expression again and use it without modifying it.

Steps:
  1. Click the Class drop-down list on the Layer Properties dialog box and click Service laterals.
  2. Now you can set up the label parameters for this label class.

  3. Use the same procedure that you just used to define the labels for the Hydrant laterals, but make these labels black, and do not modify the label expression after you load it.
  4. Click Apply to apply your changes.

Defining the labels for other laterals

You have loaded label expressions for the Hydrant laterals and Service laterals. Now you will define the labels for Fire laterals, Unknown laterals, and the <all other values> class. Since these classes are less common, and only the diameter is of interest, you will use the Diameter field alone to label these features.

Steps:
  1. Click the Class drop-down arrow and click Fire laterals.
  2. Click the Label Field drop-down arrow and click DIAMETER.
  3. Click Apply.
  4. Use the same procedure to set the labels for the Unknown and <all other values> label classes.
  5. Click OK on the Layer Properties dialog box.

    The labels are drawn on the map. The Hydrant laterals are labeled in red, and because of the label expression, the longer ones are also labeled with their material type.

You have created labels for the different subtypes of laterals using the symbology classes in ArcMap to derive the label classes.

Now you will convert the labels to annotation in the geodatabase.

Setting the reference scale for the labels

Labels are dynamic—they are regenerated on the fly when you pan and zoom around the map. By default, they will be drawn using the same size symbol, regardless of the scale to which you zoom. Not all features can be labeled using an 8-point font at the full extent of the feature class, but if you zoom in, there will be more space around the features, so more labels will be drawn.

Unlike labels, annotation is static. Annotation features are stored. They have a fixed location and a reference scale, so when you zoom in, the text gets larger on the screen. You can make labels behave more like annotation by setting a reference scale. This should be the scale at which the map will most commonly be used. When you convert the labels to annotation, you want the annotation to have the right reference scale so it will be drawn at the right size, relative to the features, on the maps you create.

Steps:
  1. Click the Zoom InZoom In tool on the ArcMap Tools toolbar and click and drag a box around some of the laterals on the eastern edge of the data.
  2. Type 1000 in the Scale box and press Enter.

    More labels are now drawn in the display.

  3. This is the scale at which the data will usually be drawn, so you will now set the reference scale for the map and the annotation that you create from it.
  4. Click List by drawing order on the ArcMap table of contents.
  5. Right-click Layers in the ArcMap table of contents, point to Reference Scale, then click Set Reference Scale.

    Now, when you zoom in or out, the labels will get larger or smaller.

Converting the labels to annotation

This section applies to ArcEditor and ArcInfo only.

Now that the reference scale is set, you can convert the labels to annotation and store them in your geodatabase. You will convert the label classes into subtypes of a single feature-linked annotation feature class. This process requires an ArcEditor or ArcInfo licensed seat of ArcMap. With an ArcView seat, you can create annotation from labels but not feature-linked annotation.

Steps:
  1. Right-click Layers in the ArcMap table of contents and click Convert Labels to Annotation.

    The Convert Labels to Annotation dialog box opens.

  2. Click in the Annotation Feature Class column for the Water laterals feature layer and rename the output annotation feature class LateralsAnno.
  3. Click the properties icon under Annotation Feature ClassConvert Labels to Annotation properties icon.

    The Annotation Feature Class Properties dialog box opens.

  4. Check the box to Require symbol to be selected from the symbol table.

    This will reduce the storage space needed in the geodatabase for the annotation. Each annotation feature will reference a symbology table in the geodatabase, rather than storing all its own symbology information. You will not be able to store graphics in this annotation feature class.

  5. The check boxes for the two feature-linked annotation editing behavior options are checked by default. New annotation will be created when new laterals are added, and existing annotation will move when laterals are moved or reshaped.

  6. Click OK to close the Annotation Feature Class Properties dialog box.
  7. Click Convert on the Convert Labels to Annotation dialog box.

    A message box appears showing the progress of the conversion process.

    The labels are converted to a set of annotation classes within a single annotation feature class. This feature class has been added to the ArcMap table of contents.

    A relationship class is also created that links the annotation to the laterals. To see this, click the Catalog tab in ArcMap to open the Catalog window. Right-click the Water feature dataset in the Montgomery geodatabase and click Refresh. A new Anno relationship class should display under the Water feature dataset.

  8. Close ArcMap.
    TipTip:

    You do not have to save the map, but you can if you want to do so.

You have created an annotation feature class in the geodatabase. The annotation classes within it correspond to the subclasses of the laterals feature class. Some of these annotation classes have special symbology, as well as logic, to annotate certain features with extra information. When the Laterals feature class is edited in ArcMap, the corresponding annotation features will be created or modified using the symbology and annotation expression you defined.

Related Topics


9/18/2012