Tips for labeling (label) in ArcGIS

Source: Internet
Author: User

Callouts are text messages that are displayed on a map, which is an essential element in the plot. The dimension is rich in style and placement is flexible, resulting in difficulty in labeling control. For example, the subscript in a geologic map, or some fractional notation, must be implemented using code programming. This article mainly combines several examples to discuss the use of annotations and the implementation in ArcGIS software.

First, the upper and lower standard

In geologic maps, the text is often used in the context of the superscript, and in the ArcGIS help you can see the following syntax:

Superscript: "" & [Superscript field] & ""

Subscript: "" & [Subscript field] & ""

However, if you need to use both the superscript and subscript, you will see this effect.

, the superscript will not be aligned, if you want to display some beautiful, you need to use advanced labeling techniques, let maplex this extension module to help us solve the problem.

About Maplex:maplex is an extension of the desktop software, and the Maplex extension for ArcGIS adds advanced labeling layout and conflict detection methods in ArcMap. Using Maplex can save a lot of time. Experiments have shown that using Maplex can save at least 50% of the time on the map. Maplex is an important tool for GIS mapping, which provides good text rendering and print-quality text layout.

The following solutions are listed:

1. Store the contents of the superscript in a field in a table of data, separated by a space, such as "superscript subscript";

2. In the Data Frame Properties dialog box, adjust the label engine to "ESRI Maplex Label engine";

3. Type the following code in the annotated expression

[Callout Field]& "" & [Superscript field] & "

This code only uses the Superscript keyword, it will display the current superscript in the superscript position, the following also need to adjust the label placement properties;

4. Click Placement properties-fitting strategy-stack label-option to make the following settings

  

As shown below, because the length of the superscript characters is different, right alignment does not achieve a perfect result, but it has improved a lot.

  

Second, fractional labeling

Fractional labeling is another difficult point, ArcGIS can not directly construct fractions, we can think of ways to underline the numerator, but for the length of the denominator than the molecule has a lot of cases, the display effect is very unsatisfactory. Therefore, it is best to be able to dynamically judge the length of the numerator and denominator and determine the length of the fractional line in the longest length, as shown in the code below (VBScript):

Function Findlabel ([numerator field], [denominator field])

Dim a,b,c

B=len ([molecular field])

C=len ([denominator field])

if (b>c) then

A=b

Else

A=c

End If

Findlabel =[Molecular Field] & vbnewline& string (a*0.5, "-") & vbNewLine & [Denominator field]

End Function

For the generation of fractions, you can also use a similar method, just add a field that represents an integer, the code is as follows:

Function Findlabel ([integer segment], [Numerator field], [denominator field])

Dim a,b,c,d

A=len ([Whole number field])

B=len ([molecular field])

C=len ([denominator field])

if (b>c) then

D=b

Else

D=c

End If

Findlabel =[Molecular Field] & vbnewline& [integer field] & String (d*0.5, "-") & vbNewLine & Space (a) & [denominator fields]

End Function

It should be noted that the effect of this code does not adjust the label to the best display effect, but if you use the Maplex label engine, you will see an improvement in the effect, as shown in.

  

Iii. Classification and labeling

Classification labels are useful for setting different dimension styles for different features in the same layer, such as highways and loops, and the font for normal roads to different sizes and colors. Labels are applied to the entire layer by default, which requires that we add a group to the default label, and set the label in the Layer Properties dialog box to "Define classes of features and label each class differently", Click Add to add a group (several different styles are required to set up a few groupings), and you want to filter the SQL statements for each grouping setting. Then set a different dimension style for each group.

  

Summary: Because labels are placed dynamically and styles can be set through VBScript and JScript, the management of annotations is very flexible. Although the labeling techniques and Maplex optimizations enable most labels to be displayed optimally, you can convert the label (label) to annotation (Annotation) If you expect some individual modifications.

Tips for labeling (label) in ArcGIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.