6

How can I hide the positive contour labels covering the green area and only display the negative contour labels over the ocean areas? I am using QGIS 2.18.2. The contour file is a separate layer and when I enable labels I cannot hide the positive contours. Refer to the image below.

Contours showing up on land area

mgri
  • 16,159
  • 6
  • 47
  • 80
ChrisW
  • 71
  • 3
  • 1
    See the answers to this question: https://gis.stackexchange.com/questions/121585/qgis-choose-contour-line-labels/121591#121591 – Dan C May 26 '17 at 13:57

1 Answers1

6

You can use the if statement to only show values which are negative, something like the following:

if("fieldName" < 0, "fieldName", '')

Example


Example:

  • Before using if statement (blue = positive contours; red = negative contours):

    Before statement

  • After using if statement:

    After statement

Joseph
  • 75,746
  • 7
  • 171
  • 282