Labeling Features
Before tackling this tutorial, you will need to download and install a dataset following these instructions:
Create a folder called labeling_features somewhere under your personal directory (e.g. C:\Users\jdoe\Documents\Tutorials\labeling_features \).
Download the data for this exercise then extract the contents of labeling_features .zip into your newly created labeling_features folder.
Open the map document
Open the labeling_features.aprx file.
The labeling_features.aprx document is a 2019 map of the Colby campus. The map document consists of four data layers: flagpole (a point layer), Contours (a polyline layer), Buildings (a polygon layer) and roads (another polygon layer).
Labeling buildings ( a polygon layer)
In this section, you will label the building polygons using the values stored in its Name attribute.
Select the Buildings layer in the Contents pane.
Click on the Labeling tab to bring up it's ribbon.
Make sure that the attribute Name is selected from the pull-down Field option.
Click on the Label button on the left side of the ribbon.
The default placement of labels will seldom give you the desired outcome straight out of the box. Fortunately, ArcGIS Pro offers many tools to manipulate the software's labeling behavior. But before you attempt any labeling modifications, you should first define the scale for which the labels are to be produced. Not doing so will change the label size (and sometimes placement) at different zoom levels. For example, at a 1:1600 scale, the labels are conveniently placed inside the polygons as shown in the following figure:
The same map, at a scale of 1:6000 will show a far more crowded field of labels as shown in the following figure:
The intended map scale will dictate the label positioning strategies. In this tutorial we will settle for a working scale of 1:4,000. To ensure that this scale is maintained regardless of the zoom level we work in, we will need to first fix the scale of the map document.
Right-click on the Map frame in the Contents pane and select Properties.
Under the General tab in the Map properties window, set the Reference scale to 1:4,000 (You can simply type the value 4000 in the field).
Click OK to close the Map Properties window.
Note that now, as you zoom in and out, the label size and placement remains fixed relative to the map's feature geometries.
Modifying the building labels
We will modify the label text by lightening its color and adding a background fill color to render it more distinguishable from the background features.
Select the Building layer in the Contents pane.
Make sure that the Labeling ribbon is active.
Change the font color to 60% grey.
Next, click on the very small arrow icon in the lower right-hand side of the Text Symbol feature group . This will bring up a label properties pane on the right-hand side of the window.
In the Label Class pane, expand the Halo element and set its Halo symbol to white fill.
This will add a thin white background to the text to help distinguish it from the line features in the map.
Set the outline width to 0.
Click Apply at the bottom of the Label Class pane to see the resulting change in the map.
You now have a not-so-overwhelming but yet legible set of building labels.
Labeling contours
Next we'll label the contours using its CONTOUR attribute values. Here, we'll assign the same color to the labels as that used to symbolize the contours. We'll also add a halo to the text to make the labels more legible. We'll then explore some of the built-in label position options offered by the software.
Select the Contours layer in the Contents pane.
Bring up the Labeling ribbon.
In the ribbon, set the labeling Field to CONTOUR then click on the Label button.
The default label placement is not appealing. The value seem disconnected from the contour lines.
Expand the Label Placement feature group in the Labeling ribbon by clicking on the small arrow icon in the lower right-hand corner of the box. This will open the Label Class pane.
Under the Position tab, expand the Placement element and, from the pull-down options, select Contour Placement.
Check the Page label alignment option.
Select Centered straight from the second drop-down menu.
The changes should be reflected automatically in the map.
Next, change the font color to 20% grey (this matches the contour line color).
Finally, you will add a halo to the text. In the Label Class pane, select the Symbol tab.
Expand the Halo element and set its color to white.
Click Apply to implement the changes.
Labeling the Roads layer
The Roads layer is a polygon that is divided into different features (parking lots, roads, etc...). This division is not apparent in the map since the layer's outline is set to No Color. In the next step you will label the polygons using the layer's Name attribute. However, some of the feature shapes will pose a labeling challenge requiring us, at some point, to convert the labels to a standalone, editable, label feature class.
Select the Roads layer in the Contents pane.
Activate the Labeling ribbon.
Set the Field name to Name.
Click on the Label button.
Next, change the label colors to Cordovan Brown.
In the Label Class pane, click the Position tab and set the placement to Curved in polygon.
This placement strategy works well for some of the features in the layer such as the Marylow parking lot or the Alumni parking lot. But some of the other features such as Mayflower Hill Drive require additional tweaking which is best done independently from the other labels. To manually edit labels, you need to convert the current set of labels to a standalone feature class. Think of this as yet another vector layer type (like a polygon or polyline layer) with the difference being that you are storing text labels and not points or line segments.
Select the Map tab then click on Convert to Annotation from the Map ribbon. This should bring up a geoprocessing pane.
In the Convert Labels to Annotation geoprocessing pane, set the following:
Scale = 1:4,000
Convert type to Single layer.
Feature layer: Roads.
Save the output to the Labeling_features.gdb geodatabase that came with this tutorial's dataset.
Click on Extent of a layer button under the Extent block.
Note that the geodatabase was already created for you. You could save it to a default geodatabase or create a new one from scratch.
Set the Extent to Roads (this to ensure that all labels are converted).
Click Run .
When done, you will see the new annotation layer added to your map document. You'll also note that the original labels initially enabled for the Roads layer are now disabled. All road labels displayed in the map are now being pulled from the RoadsAnno layer. Next, we will edit the Mayflower Hill Drive label.
Note: the location and orientation of the labels in your map may be different from those shown in this tutorial. The following steps apply to a stacked annotation that you might want to unstack such as Mayflower Hill Drive in this working example.
Select the RoadsAnno layer in the Contents pane.
Click the Edit tab to enable its ribbon.
In the Edit ribbon click on the Annotation tool.
With the annotation selector tool, select the Mayflower Hill Drive label. (Note that the location of your Mayflower Hill Drive may not match that shown in this figure)
A selection box with handles should wrap the label. You may also see a font properties tool pop up at the bottom of the map window. Be careful not to manipulate the handles of the box--doing so will resize the label's fonts. If at any point you inadvertently make changes to the label, simply type ctrl + Z to undo the changes.
The next key step is to unstack the label. In the simplest case, all you need to do is right-click on the label in the map and select Unstack.
If the Unstack option is not available, you might need to convert the label to a single part and/or straighten the text as shown in the following example.
Depending on your annotation state, you might need to convert it to a single part by right-clicking it and selecting Convert to Single Part. If this option is not enabled, your label is already in a single part.
NOTE: This step should unstack the text. You might need to right-click on the text again and select Curvature >> Straight, then right-click again and select unstack.
Next, select the Move tool from the Tools feature group (in the Edit ribbon).
Move the Mayflower Hill Drive label inside the road polygon. You may wish to move it further down the drive (south of the Marylow parking lot)
You may also need to rotate the label. This can be done by selecting the Rotate tool from the Tools feature group.
At this point, feel free to continue editing the annotations. Remember, you can always undo a change by typing ctrl + Z.
When done editing the label, press the F2 key.
When you are done editing the annotations, make sure to save the edits by clicking on the Save button on the Edit ribbon.
Labeling the point layer
Finally, you will label the point layer. The procedure is the same as it is for any other geometry type however, in our working example, we do not have a flagpole point layer attribute that we can use for labeling the point feature. Instead, we will manually type in the label value for the point.
Select the flagpole layer in the Contents pane.
Click on the Labeling tab to bring up its labeling ribbon.
On the left-hand side of the ribbon, click on the Expression button next to the pull-down field. This will bring up the Label Class where we'll be able to define the label expression.
In your right-hand pane, you should see an expression box, type "Flagpole" in this box (make sure to include the double quotes).
Click the Apply button at the bottom of the Label Class pane.
Next, click the Label button to place the label in the map.
Now on your own, feel free to modify the font style and color as you please following the instructions covered in earlier steps.
This completes this tutorial.