Monday, 2 October 2017

labeling - Label placement on rotated map in QGIS


I'm a newbie to GIS and QGIS (please be nice to me). I'm working on a map for a garden/arboretum catalogue using QGIS 2.6.1. The arboretum has been surveyed using GPS, and the specimen trees and plants become a point layer labelled with a reference number, which points to a description in the main catalogue.



Because of the site layout and orientation, the map needs to be rotated to fit comfortably on a rectangular canvas (paper, screen). Fine, I can do that in print composer. But that rotates the labels too, and for maximum legibility I want them to stay horizontal.


I've been experimenting with label placement. "Around point" gives significantly better results than "Offset from point". Using this method, the only way I've found to apply a compensating rotation to the labels (so that when the map is rotated they end up back horizontal) is to add a "rotation" column to the attribute table and use data defined rotation. But this to some extent messes up the label placement. So my first question is: is it possible to get the placement engine to run (again?) after the labels have been rotated?


If not, I would like to be able to reposition a few of the labels manually, but leave most of them automatically placed. But if I add coordinate x and y columns to the attribute table and try to use data defined coordinates, then label rotation stops working if there is a NULL value in either or both of the x and y coordinate columns. I can't leave most of the points to be automatically placed and just fix a few - effectively I have to do manual placement for all of them if I want to do it for any of them. Since there are approx. 200 of the things, that's a major chore. Have I missed something?


Some of this might be easier if the "Move label" button would work. But however I've fiddled - with editing on/off, data defined placement on/off and so on - I've never seen the thing not greyed out. What do I need to do to get this working?


The best I've been able to do is have a data defined distance override for some points. This is rather hit and miss, because there's not much control over where the label will actually go, and it has unpredictable knock-on, domino effects on other labels some of which may end up worse than they were before. But it doesn't affect label rotation.




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...