Labelling Tips and Tricks
Labelling Tips and Tricks
in ArcGIS Desktop
1-2
Workshop Overview
1-3
Assumptions for This Workshop
1-4
Assumptions
This workshop assumes you
– are comfortable with ArcGIS® Desktop 10.x ArcMap, and
ideally ArcGIS Pro ®
– Know the basics of turning labels on, changing fonts,
adding basic graphics with the Graphics toolbar, and have
at least worked a little with geodatabase annotation
1-5
Map Annotation
1-6
Map Annotation Basics
All graphics are annotation
– Text
– Polygons, lines, points
Stored only in the map, not in a
geodatabase
Can be converted to geodatabase
annotation (ArcMap and ArcGIS Pro)
1-7
Map Annotation Basics
Stored in Annotation Groups
Accessed via Data Frame Properties
Has reference scale
Can be associated with a layer
1-8
Map Annotation Groups
Set the annotation target before adding graphics
Turn annotation groups on/off
1-9
Map Annotation Tricks
Lots of tools for adding text (callouts, polygon text, etc.)
Label tool pulls text from the attribute table
1-10
Default Symbol Properties
Set default symbol properties
1-11
Geodatabase Annotation
1-12
Geodatabase Annotation
Stored as an annotation feature class in a geodatabase
Has display properties
Has attributes
Must be edited in an edit session
1-13
Annotation Display Properties
Transparency
Scale Dependency
Definition Query
Hyperlinks
Time display
1-14
Temporarily Substitute Fonts
Change the font used for an annotation layer in the current
map
1-15
Add New Annotation
Use templates to construct new
annotations
Annotation Construction window
opens when you choose a construction
tool
Use Find Text to pull the value from
the current label expression for a layer
– click the Find Text button and then
click on the point, line, or polygon that
you want to create annotation for
1-16
Convert Labels to Annotation
Convert labels to
geodatabase annotation in
ArcGIS Pro
1-17
Convert Labels to Annotation
Convert labels to annotation in ArcMap
1-18
Bulk Edit Annotation
Annotation feature classes have attributes
Select the annotation records that you want to change and
use the Field Calculator to change values
1-19
Bulk Edit Annotations
Calculate the
– FontSize
– TextString
– or any other attributes
1-20
Bulk Edit Annotation
Use the Attributes window to bulk
update the attributes
1-21
Label Basics
1-22
Managing Labels
Text not stored as a text feature, but created on the fly from
attributes. Display properties are stored.
Labels managed through Layer Properties or Label Manager
1-23
Reference Scale
Set the Reference Scale of
the data frame to reduce
clutter on the map and
ensure that labels look their
best when printed
1-24
How Would You…?
TEXAS
Austin
1-25
Label Priority Ranking
Order in which labels are
drawn on the map
– Higher position = higher
priority (labeled first)
Layer by layer
Label class by label class
1-26
Label Weight Ranking
Label weights
– Low, medium, high
– Default is high
Feature weights
– None, low, medium, high
– Default is none
Features not overlapped by
labels of equal or lower
weight
1-27
Mapplex
Basic Label Engine is the default
Maplex Label Engine gives more control over placement
1-28
Mapplex
Automatically resize font to fit
Abbreviate label
Stack labels on spaces or punctuation
Repeat labels
Many others
1-29
Label Classes
1-30
How Would You…?
Pop: 2,195,914
1-31
Label Classes
Group features
Each group gets an independent set of label properties
– Hierarchy of features by label symbols
1-32
Creating Label Classes
STEP 1: Create the class and give it a name
1-33
Creating Label Classes
STEP 2: Specify the SQL query that defines the label class
1-34
Label Expressions
1-35
How Would You…?
Owner: TeachMeGIS
Exp: 12/31/2075
Owner: TeachMeGIS
Exp: 12/31/2015
1-36
Label Expressions
Use the Expression button
to further customize labels
– Label with more than
one field
– Stack labels for easier
reading
– Add strings (eg. units)
– Format text and
numbers [COUNTY] + "\n" + [SQUARE_MIL] + " sq. mi."
1-37
Simple Expressions
Expression
– Concatenate multiple
fields
– Add static text (Units)
– Create multi-line labels
– Python, VBScript, or
JScript
1-38
Multiple Fields
1-39
Static Text
Double quotes around text
Don’t forget a separator
between the attributes
1-40
New Line
Python: “\n”
VBScript: vbNewLine
Jscript: “\n”
1-41
Customizing Labels
ArcGIS text formatting tags (HTML tags)
VBScript
JavaScript
1-42
Text Formatting Functions
Use anywhere a text string and symbol are specified
– Label expressions
– Annotation
– Legend descriptions
XML syntax rules
– Start and end tags
– Can be nested
1-43
Formatting Functions
Function Tag Example Output
[API] + "& " + 94736283950
& &
[SPUD_DATE] & 4/1/2009
< < "<" + [STATUS] + ">
<Not leased>
> > "
"<FNT name=‘Comic Sans MS’
Font <FNT> </FNT> size=‘14’>" + [API] + 94736283950
"</FNT>"
"<CLR red=‘255’,
Color <CLR> </CLR> green=‘0’, blue=‘0’>" + 94736283950
[API] + "</CLR>"
Bold <BOL> </BOL> "<BOL>" + [API] + "</BOL>" 94736283950
Italics <ITA> </ITA> "<ITA>" + [API] + "</ITA>" 94736283950
Underline <UND> </UND> "<UND>" + [API] + "</UND>" 94736283950
1-44
Python Functions
Function Example Output
+
[FIELDX] + ", " + [FIELDY] 2341.023, 2893.089
(Concatenation)
94736283950
\n (New Line) [API] + "\n" + [SPUD_DATE]
4/1/2009
round round((float([Area]), 2) 9859083.76
[CITY].upper()
.upper() HOUSTON
[CITY].lower()
.lower() Houston
[CITY].title()
.title() Houston
1-45
VBScript Functions
Function Example Output
&
[FIELDX] & ", " & [FIELDY] 2341.023, 2893.089
(Concatenation)
[API] & vbNewline & 94736283950
vbNewLine
[SPUD_DATE] 4/1/2009
Round Round([Area], 2) 9859083.76
LCase LCase([NAME1]) forest oil company
UCase UCase([NAME1]) FOREST OIL COMPANY
FormatCurrency FormatCurrency([CHK_AMOUNT]) $1,948.00
FormatDateTime FormatDateTime([EX_DATE], 1) Friday, April 3, 2009
FormatPercent FormatPercent([ROYALTY], 3) 37.325
Multiplication [ACRES] * 4046.85642 27845089.3784
1-46
Advanced Expressions
Define a complete function
– Inputs are fields
– Output is label string
– Conditional statements
– Loops
Examples:
– Stack a label at a comma
in the text
– Label Percent Interest
from multiple fields
1-47
Arcade (Pro)
New language for labeling
in ArcGIS Pro
1-48
Workshop Overview
1-49
Thanks for Attending!