Tag Info

Hot answers tagged

8

This answer is heavily revised from the original suggestion, based on new Question details. Since you want to have a legend describing the symbol/color meaning in addition to just labels on the map, the best way to approach this is to edit the symbology of the points, and add simple labels. Select Quantities / Graduated symbols. Use whatever field has the ...


4

I would use a Python expression like the following by checking Advanced on the Label Expression dialog of the Labels tab of the Properties dialog: def FindLabel ( [TestField] ): return [TestField].split("-")[1] This relies on there only being one occurrence of "-" in the field.


4

No you cannot have one layer using maplex and another layer using standard labeling within the same data frame. However, you could enable standard labeling in a separate dataframe within the same MXD. That way one dataframe would be maplex, and the other would be standard I don't see why you would want this though, so perhaps if you provide more ...


4

This function doesn't need to be too complex. Convert the items you want into a list, then join the result. def FindLabel([A1], [A2], [A3]): args = [A1, A2, A3] items = [str(x) for x in args if bool(x) and int(x) > 0] if any(items): return '-'.join(items) else: return ' ' If this were proper Python, you would normally ...


4

Here's how to access that setting. First open the layer properties by double clicking a layer, then go to the labeling tab. Look for the button in the top-right of the window (shown below): Then, switch off "show partial labels": This setting applies to all labelled layers in your project.


3

Try: def FindLabel ( [name_field] ): a=[name_field] l=a.rfind("-")+1 a=a[l:] return a


3

There are missing semi-colons and problems with the parentheses. then you should make sure that you always have a string output. EDIT : sorry, I've given a solution for the field calculator. This solution is updted for the labelling engin. def FindLabel ( [A1], [A2], [A3] ): a1=[A1] a2=[A2] a3=[A3] if ( (int(a1) == 0) and (int(a2) == 0) ...


2

There's two ways you could do this. One is to wrap your field that contains some nulls by the 'coalesce' function: Coalesce("tree_field_name", '0 trees') This would use the value in tree_field_name if it's non null, otherwise it will use the string '0 trees' (pay attention to the use of " and '). The alternative is to use a "case when" function: Case ...


2

In MapInfo Professional you can easily setup a label expression in stead of a fixed column. Pick the text Expression from the "Label with" dropdown list. In the Expression dialog enter your expressions, in this case: ACRES * 2.5 Hit OK to the Expression dialog and now you have specified a label expression. If you have turned on Autolabel for the layer ...


2

First, the resource page to help you in the future: Building label expressions There are a lot of examples on that page, including Python, VBScript and JScript. If it were me, building the expression in VBScript, I would use a combination of the Instr, Len, and Mid functions. If it is supported, use the InStrRev function, as that would let you search for ...


1

Making the ids: Right-click on your point layer and Open the attributes table from the pop-up menu. Make the layer editable by clicking on the yellow pencil icon Click the Open Field Calculator button (last on the right - abacus icon) Ensure that Create a new field is checked (it should be by default). Call the field 'Id' (or something) - you can accept ...


1

Double click in the points layer, go to label tab, Active "label this layer with" and select the field name: X or Y If you want both, you can write an expression like X||' - '||Y


1

The reason your code was failing was you had multiple "if" statements without an "end if" for each of them. It looks like you wanted "elseif" for the second, third, and fourth checks. Function FindLabel ( [_Seq1_TractDepthSequence], [_Seq1_BegInterval] ,[_Seq1_EndInterval], [_Seq1_DeckCorpRITot], [_Seq1_DeckCorpORRITot] , [_Seq1_DeckCorpIntTot] , ...



Only top voted, non community-wiki answers of a minimum length are eligible