QGIS 1.8.0 Mac OS 10.6.8: I want to label each polygon in a layer in a similar way to this image (done in WP Presentations) and am totally confused by the manual. Obviously I have to find a list of polygons in the layer, then populate a field with the labels. Help getting started will be greatly appreciated.

http://johnsankey.ca/qgis1.jpg http://johnsankey.ca/qgis0.png

  • To label the polygons, you may use the labeling tool (menu Layer -> Labeling), put a check next to 'Label this layer with' and select the attribute you want to put in the label (it might be a 'name' column in your example). If you need help styling the polygons of different types in different colors and opacity, first you must explicitly tell what each color and opacity means (at least for the 'townhouse' entry in your legend). – Cao Minh Tu Mar 30 '13 at 1:07
  • Here's as far as I've got (2nd image above). By labelling with id I can get various numbers on each polygon, but how do I associate a name with each? So far all I've got is a default name on each; I can't find any list of id's so I know how many there are, nor any list where I could insert unique names. – johnsankey Apr 1 '13 at 1:21
  • if there are no names in your data, what's your plan to get them? Of course you could enter them manually in attribute table ... – underdark Apr 1 '13 at 1:31
  • Could you post a screen shot of your layer's attribute table: select the layer - which is 'coop' in your case - in the Layers panel on the left, then select the menu Layer -> Open Attribute Table? I want to check if the buildings' name are in there. – Cao Minh Tu Apr 1 '13 at 2:02
  • Attribute Table ! That's what I've been looking for all along. Manual entry is fine. Just one more question: multiline labels seem to be an option in the layer properties labeling (double-click layer name) but not in the top menu labeling. How is a line break entered in a string in the attribute table for the former? – johnsankey Apr 1 '13 at 4:31

QGIS 1.8.0 Mac OS 10.6.8 - others may differ. What I've found so far:

There are two independent labellers in QGIS, one accessed through the layer drop-down menu Labeling (sic) or via the ABC icon; the other through double-clicking the layer name and clicking the Labels tab. See above though, this may change.

Label names can only be entered via the layer drop-down menu: Attributes. A new layer will show two columns, a row number and a numeric 'id'; imported layers may show more. Don't remove the id column or anything to the left of it or the layer will become uneditable; you'll have to delete and recreate it from scratch including features. Columns can only be deleted from the right, not from the middle, or column linkages get fouled up.

Create a new column. Make sure it's long enough; you can't lengthen it later. It's handy to use the old labels system to display the id of each feature so you know which is which while you work on the new column entries that will be displayed via the dropdown Labeling. The latter is smarter - it tries to avoid label overlaps.

Remove everything from the default label box (old system) if you want to leave some features unlabelled with it.

When you have created everything and hit OK back through all the windows, nothing new will show until you toggle editing off to save the changes.

Many thanks to Cao Minh Tu

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.