Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm new to QGIS 2. I have a polygon shape with two classes, and I want to set different labeling style and different "Scale-based visibility" but I don't get how the expression works.

share|improve this question

1 Answer 1

Go to Style tab of layer properties dialogue. Select rule-based option from the dropdown list. Here you can define how polygons should be rendered (see image below)

I defined two styles, one for polygons having id = 1 and the other for polygons having id = 2. Their min. and max. scale differ, as you can see in the picture.

For the labels probably the easiest way is using data-defined properties on Labels tab. See how it works here.

Here you can see both polygons visible as they fit between min. and max. scale (I changed the values, the princip is the same though).

enter image description here

And here you see just the blue one because I zoomed out far beyond the max. scale of the green polygon.

enter image description here

If you have any further questions, feel free to ask.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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