[GIS] How to accomplish conditional labeling based on map scale and attribute in QGIS 1.7

labelingqgis

How can I label with qgis 1.7, based on attribute and scale of map?

For example scale>1:1000 then label all those features whose area>100000 at font size 12 and those features whose area<99999 at font size 5.

Best Answer

This can't be accomplished with a single layer as far as I know (as per Nathan-W's answer) but you can do it with two separate identical layers and scale-based visibility. I don't have QGIS 1.7 installed anymore (using 1.8 & 2.0) but this should work:

  • Set up one layer with labels at, say, 12 points, and make the layer visible from 1:1-1:500,000 (Layer Properties | General, and find "Scale dependent rendering");

Map with 12 point labels

  • Set up the second layer (same origin data, just add it again) with 5 point labels, and make it visible from 1:500,001 to 1:10,000,000 in the same way.

Map with 5 point labels

When you zoom out past the 1:500,000 threshold one layer and its labels disappears and the other appears; this is nice when combined with different sizes of line widths and symbol sizes, too.

Related Question