2

I'm using QGIS 2.0 but this problem was also present in QGIS 1.8.

I have a truetype font of freeway symbols that I use to label polylines. Each symbol requires between three font characters to display correctly. For this reason, each character has a field and I have duplicated the shapefile three times and use a different field for the label each time and overlap the labels.

In the labeling engine, we can change the number of label candidates to one to force labels to overlap and this works great in the QGIS map canvas (working environment - see picture 1 below) but it's not working in the composer. The composer shows the three labels side by side instead of overlapping (see picture 2 below).

In QGIS 1.8, with labeling from the layer properties menu (that is now deprecated if I'm not mistaken) worked fine with overlapping labels but it would create "static" labels. The labeling from the layer menu creates "dynamic" labels that move around with zoom level.

I would like to have overlapping dynamic labels that also work in the composer. How can I make the labeling engine do this?

Correctly overlapping labels

Labels not overlapping in composer

1

In QGIS 2x the labeling engine can do everything that the 1.8 version could and is more advanced. Note the loads of little drop down menus all over the tabs of the labeling dialog. These allow you to set the fields for data-dependent rendering (Font, size, coordinates etc).

enter image description here

Also, if you converted some of your symbols (namely the backgrounds - can you combine the white and red parts into one) to SVG then you can further simplify the process by setting the SVG as the background to your blue part, and thereby dispense with the need for duplicating your layer three times and all the fiddly placements, thus greatly simplifying your cartography pipeline. I recommend IncScape for the conversion to SVG.

  • Thank you very much. That's exactly what I ended up doing. At first I thought it would be a drag making a background but it was well worth it. Unfortunately I couldn't get Inksacpe on the computer I'm using so I had to use Adobe Illustrator which would only save the SVG geometry by calling system fonts (which in turn didn't work in QGIS for some) and not creating path geometry (since my starting point was a font), so I had to convert fonts into path geometry which took some time. I don't know if Inkscape would've saved me that trouble, I would have to try it on another computer. – themapguy Feb 20 '14 at 20:56

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.