Wednesday 14 August 2019

QGIS 2.2: Rotated labels not possible any more?


Using Qgis Valmiera I would like to create feature labels on a layer that are rotated with a rectancular whitish background.


Using "Labels (deprecated)" and entering an angle does the first part of it but I can't make a rectangular backgound. The "buffer labels" option does something similar but it's too fancy and creates giant PDFs.


Using "Labels" I can easily draw a rectangular background but it seems the option to rotate text has been deprecated. Interestingly I can rotate the backgound frame ...


Is there a way to combine both?



Answer



Firstly, don't use the 'deprecated' labeling. It's deprecated for a reason ;)


The new labeling functionality does allow for rotation. Simply add a "Rotation" column to your attribute table, start editing the layer, and under the Layer Properties > Labels > Placement > Data Defined, set "Rotation" to the new field you just created. Then click the "Rotate" button on the labeling toolbar, and select the label you want to rotate. Dynamically rotate on the map by moving your mouse. Alternatively, you can select the label, and click the "Change Label" button, then type the rotation manually.


Label Rotation Settings



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...