1

I am trying to label spot elevation points. Here is what I currently have:

Label expression:

Function FindLabel ( [OBJECTID], [CVC_1_Z], [CVC_2_Z] )
  FindLabel = [OBJECTID] & " ELEV(CVC_07)=" & [CVC_1_Z] & " " & " ELEV(CVC_18)=" & [CVC_2_Z] 
End Function

Result:

spot elevations

How can I only label those points with non-zero Z values?

1

2 Answers 2

6

I've used this label expression with success when labeling elevations greater than zero:

def FindLabel([yourField]):
    if [yourField] is not None:
        if int([yourField]) > 0:
            return [yourField]
        else:
            return None
    else:
        return None

Using Python as the parser and checking the Advanced box.

Replace [yourField] with whatever field you are using to label.

I found this as an answer for a similar question: Expression labelling in ArcMap: Label only where value is > 1

1
  • Welcome to the site mf471. Although this contains a valuable link, it is preferable to convert this into a stand alone answer. More details here: meta.stackexchange.com/questions/8231/…
    – Aaron
    Commented Apr 3, 2015 at 17:46
2

Use the ArcMap Label Manager from the Labeling Toolbar

Choose the Label Class you're working with

Click the SQL Query button

Write a query to filter out features with an elevation of 0 (the features themselves will display, but the labels for those features will not)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.