Labels workflow in QGis and Inkscape

However matured the labeling engine in Qgis is, there is still a moment when you think beyond QGis in order to position the labels and icons as you want. I managed to setup a workflow with QGis and Inkscape with satisfactory results. Both are opensource. But if anybody has better options I would like to hear from you!

Below you find a detailed map of the Dutch town of Zwolle

Zwolle centrum

I was pretty satisfied about the labeling in general, but noticed that occassionaly the busstop sign or label interferes with steetnames or parking icons. My solution was to separate the busstops and parkinglot icons from the rest, export the first as SVG and the last as image. In Inkscape I can then load the last as an image layer, import the svg on top of it and reposition labels and icons when necessary.

Workflow with Qgis

1. Make layer presets

First you’ll need to create to layer visibility presets. On top of the layer panel you see an eye icon. The dropdown list gives you an Add preset option, whereby you store the visibility of all layers at this point in time in a preset with a name of your own choosing.

After the first preset, I created a second preset, where all layers are invisible except busstops and parking lots. Below you’ll notive two presets names: Preset_default (which is the normal situation without busstops and parking lots) and BusstopsParking (which gives you only the busstop and parking lot layers).

2. Print Composer

Switch on the Preset_default preset and activate the Print Composer, choose or make a new Composer for this map and save the result as an image.

Close the print composer, switch on the BusstopsParking preset, and activate the Print Composer, choose the same Composer. If necessary click on the refresh button on top, in order to let the composer reflect the layers visibility of the canvas. Save the result as a SVG file. I have switched off both SVG export options. ‘Render map labels as outlines’ would give you text in SVG as lines instead of text.

3. Inkscape

Start Inkscape.
Change the Page Size in the Document Properties into Landscape.
Import the image file and position on the page.
Add a new layer and rename to BusstopsParking  and position above the image layer.
Align the topright corner of the background layer with the topright corner of the BusstopsParking layer. Wait for the ‘cusp node to corner’ text appears and let go of the mouse. See below.

Both layers should now be aligned exactly on top of each other (I think) .
Ungroup the BusstopsParking layer (click on the layer with the right mouse and choose Ungroup). Do that several times. If you then delete two white rectangles, you have been left with the labels and icons on top of the background layer.

You can start moving the labels and icons now. See below.

 

Once you’re done, you can save the file with the command ‘Save as copy’ and choose the PDF format. Since the data is all vector, the DPI isn’t relevant. I leave it at 96 DPI.

Done!

 

P.S. I use Qgis 2.18.3 64bits and Inkscape 0.92