1

I have a layer of roads from OSM. I have selected 166 "Motorway or highway" road type out of 3,986 rows. enter image description here I need to label only this road type without deleting any data. When I am typing "TYPE" in the "Label with" window I have all the road types labeled.enter image description here How can I label only this selected rows?

3

Or you can achieve this with more flexibility by using rule-based labeling. Instead of "show labels for this layers" choose "rule-based labeling, add a new rule (plus button). enter image description here

In the filter box type "TYPE"='Motorway or highway'

and choose "TYPE" for the label with input.

enter image description here

2

If I'm understanding you correctly you want a row's NAME displayed only when that row's TYPE is 'Motorway or highway'. If that is the case then you can use the following in the "Label with" field (instead of the string TYPE that you currently have):

if (TYPE='Motorway or highway', NAME, '')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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