labeling and annotation in arcgis desktopteachmegis.com/tiptricks/labelingtipsand tricks.pdf ·...
TRANSCRIPT
1-1
Labeling and Annotation in ArcGIS Desktop
Tips and Tricks
Instructor: Jenny HarrisonE-mail: [email protected]
1-2
There are many options when labeling and using annotation in ArcMap®. This presentation will show you how to use label classes and label expressions, among other things, to customize labels on your map. We'll also discuss map and geodatabase annotation, how to use annotation groups, and how to edit annotation in bulk.
1-3
Workshop Overview
• Assumptions for This Workshop
• Map Annotation
• Geodatabase Annotation
• Label Basics
• Label Classes
• Label Expressions
Labeling and Annotation
1-4
Assumptions for This Workshop
1-5
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-6
Map Annotation
1-7
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-8
Map Annotation Basics
Stored in Annotation Groups
Accessed via Data Frame Properties
Has reference scale
Can be associated with a layer
1-9
Map Annotation Groups
Set the annotation target before adding graphics
Turn annotation groups on/off
1-10
Map Annotation Tricks
Lots of tools for adding text (callouts, polygon text, etc.)
Label tool pulls text from the attribute table
Use text formatting tags in labels
1-11
Default Symbol Properties
Set default symbol properties
1-12
Geodatabase Annotation
1-13
Geodatabase Annotation
Stored as an annotation feature class in a geodatabase
Has display properties
Has attributes
Must be edited in an edit session
1-14
Annotation Display Properties
Transparency
Scale Dependency
Definition Query
Hyperlinks
Time display
1-15
Temporarily Substitute Fonts
Change the font used for an annotation layer in the current map
1-16
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-17
Convert Labels to Annotation
Convert labels to geodatabase annotation in ArcGIS Pro
1-18
Convert Labels to Annotation
Convert labels to annotation in ArcMap
1-19
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-20
Bulk Edit Annotations
Calculate the
– FontSize
– TextString
– or any other attributes
1-21
Bulk Edit Annotation
Use the Attributes window to bulk update the attributes
1-22
Label Basics
1-23
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
Managing Labels
1-24
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
Zoom to a scale at which the labels look best and set the Reference Scale
– Labels get smaller as map is zoomed out
– Labels get larger as map is zoomed in
1-25
How Would You…?
T E X A SAustin
1-26
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-27
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
Affects other labels, even when labels are turned off
1-28
Mapplex
Basic Label Engine is the default
Maplex Label Engine gives more control over placement
1-29
Mapplex
Automatically resize font to fit
Abbreviate label
Stack labels on spaces or punctuation
Repeat labels
Many others
1-30
Label Classes
1-31
How Would You…?
Pop: 2,195,914
1-32
Label Classes
Group features
Each group gets an independent set of label properties
– Hierarchy of features by label symbols
1-33
Creating Label Classes
STEP 1: Create the class and give it a name
1-34
Creating Label Classes
STEP 2: Specify the SQL query that defines the label class
1-35
Label Expressions
1-36
How Would You…?
Owner: TeachMeGISExp: 12/31/2075
Owner: TeachMeGISExp: 12/31/2015
1-37
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-38
Simple Expressions
Expression
– Concatenate multiple fields
– Add static text (Units)
– Create multi-line labels
– Python, VBScript, or JScript
Single symbol for all labels
1-39
Multiple Fields
1-40
Static Text
Double quotes around text
Don’t forget a separator between the attributes
[Operator_Num] + " " + [TV_Depth] + " ft"
1-41
New Line
Python: “\n”
VBScript: vbNewLine
Jscript: “\n”
[Operator_Num] + "\n" + [TV_Depth] + " ft"
1-42
Customizing Labels
ArcGIS text formatting tags (HTML tags)
VBScript
JavaScript
"<bol>" & [name] & "</bol>" & vbNewLine & [ground_ele] & " ft"
1-43
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
– Not interpreted by Python, VBScript, or Jscript. Just passed as text.
1-44
Formatting FunctionsFunction Tag Example Output
& &[API] + "& " +
[SPUD_DATE]
94736283950 & 4/1/2009
<>
<>
"<" + [STATUS] + ">
"<Not leased>
Font <FNT> </FNT>
"<FNT name=‘Comic Sans MS’
size=‘14’>" + [API] +
"</FNT>"
94736283950
Color <CLR> </CLR>
"<CLR red=‘255’,
green=‘0’, blue=‘0’>" +
[API] + "</CLR>"
94736283950
Bold <BOL> </BOL> "<BOL>" + [API] + "</BOL>" 94736283950
Italics <ITA> </ITA> "<ITA>" + [API] + "</ITA>" 94736283950
Underline <UND> </UND> "<UND>" + [API] + "</UND>" 94736283950
1-45
Python FunctionsFunction Example Output
+
(Concatenation)[FIELDX] + ", " + [FIELDY] 2341.023, 2893.089
\n (New Line) [API] + "\n" + [SPUD_DATE]94736283950
4/1/2009
round round((float([Area]), 2) 9859083.76
.upper().lower().title()
[CITY].upper()
[CITY].lower()
[CITY].title()
HOUSTONHoustonHouston
Multiplication [ACRES] * 4046.85642 27845089.3784
Open the Python Window in ArcMap and type dir("")to geta list of available string functions or dir(1) for numeric functions.
1-46
VBScript FunctionsFunction Example Output
& (Concatenation)
[FIELDX] & ", " & [FIELDY] 2341.023, 2893.089
vbNewLine[API] & vbNewline &
[SPUD_DATE]
947362839504/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-47
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-48
Arcade (Pro)
New language for labeling in ArcGIS Pro
1-49
• Assumptions for This Workshop
• Map Annotation
• Geodatabase Annotation
• Label Basics
• Label Classes
• Label Expressions
Workshop Overview
Labeling and Annotation
1-50
Thanks for Attending!
Labeling and Annotation
Presenter: Jenny HarrisonE-mail: [email protected]