I have a contour vector layer with a step 0.2m . I want every 1 metre, to change the line style, a thicker line for example, and the rest of them,symbolize with a dotted style. So, I can do it manually, categorize the layer, and at each metre,change the style, or I can copy the file, paste it and delete all the Real numbers, leave the integers only, and style them as I like and put the layer over the original. My question is if I can do the same job with the "Rule-base" style. If there is a formula which can locate the integer numbers and make them a category, so I can finish my job quicker.
Asked
Active
Viewed 2,237 times
1 Answers
11
Try to do the following formula at Rule-based Style
"FieldName" % 1 = 0 (Assign thick lines for 1 meter interval lines)
ELSE (Assign thin lines or any other style for other interval lines)
In the above image "Elevation" is the name of the field that holds the contour elevation.
ahmadhanb
- 40,826
- 5
- 51
- 105
-
It works perfectly, thank you ahmadhanb, also thank you for the explanation in the parenthesis. – Pitheas Oct 27 '17 at 12:52
-
You are most welcome. Glad it worked :) – ahmadhanb Oct 27 '17 at 12:53
