Take the 2-minute tour ×
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 just imported original OSM data to export a pdf-map by assigning graphic attributes to the features I need.

The label tool in QGIS 1.8 allows to select certain features, like I can do with the graphic style. But I do not know and can not find how to label a feature like ref (street-nr) of a certain tag like highway = motorway (especially if all other line elements are labeled by name).

tags LIKE '%"highway"="motorway"%'

and then? ref is a feature with an attribute in the column tags.

Another Example: Can I achieve several labeling sizes for different tags like city, town or suburb?

The old labeling menu allows only one label attribution for each layer. Can I select labeling by any attribute?

Thanks for any help and tips concerning the syntax in QGIS attribution and labeling. (The answer: "How to label features in QGIS using SQL statement?" did not help at least)

share|improve this question
add comment

1 Answer

Using expression-based labeling and CASE WHEN THEN constructs, it should be possible to achieve what you are looking for:

enter image description here

Different label sizes are currently only possible if you define the label size in attributes and use data-defined labeling.

share|improve this answer
    
Ok, thanks. But I could not work out the syntax. The function help list in QGIS 1.8 is empty: "(Hoppla! QGIS kann die Hilfe für die Funktion nicht finden Die Hilfedatei für Operatoren wurde nicht gefunden. Sie war weder in Ihrer (de_DE) noch in englischer Sprache verfügbar. Wenden Sie sich an das QGIS-Entwicklerteam, falls Sie eine ergänzen möchten.)" I was not able to sort out, how to define to use the "ref"="A 1" tag from "tags" when "highway"="motorway" –  robert-t Nov 19 '12 at 21:55
add comment

Your Answer

 
discard

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.