Saturday 24 September 2016

qgis - How to add labels outside of features?


I'm trying to achieve this kind of labeling using QGIS. Apparently, it doesn't seem to be easily supported. Would you have an idea for a workaround ?


enter image description here


I managed to have circled text using "Diagrams", which it seems I can even place using an X and Y coordinate field ! But I have no idea on how to draw a line between the circle and the building... I have about 400 circles to place, and they could quite often change, so I can't rely on a manual method.


Any idea ? Thanks a lot !





So here's what I've got using the plugin you suggested :


what i've got


Not bad at all !! Thank you VERY much !


I'm only struggling to put the number in the center of the circle. I see there are two fields : LblAlighH and a LblAlignV. Entering "center" in LblAlignH centers the number horizontally, but I tried "middle" or "center" in LblAlignV without anything happening... (in the image, I've entered center for LblAlignH in the one at the bottom)


Would that be possible ? :)


(Are you by any chance the developer of that plugin ?)




Okay, "half" in the VAlign field seems to work fine ;)


To create the circles, I used line decorations in the Arrow_Label_XXX layer :



how to


And here's the final result :


final result



Answer



What you need is the (quite new) plugin "Easy custom labeling":



Easy custom labeling v. 0.3, Regis Haubourg (AEAG) - 2012. Action 1:This plugin duplicate a layer, transforming geometries into centroids, and adds all required fields for custom labeling. Action 2 - Arrow function draws lines between label and original object WARNING! This plugin requires to use Memory Layer Saver plugin if you want to save labels with project. In QGIS 1.8, memory layer saver 1.0 is needed because of new gml behaviour (GDAL 1.9) Please send bugs or features requests here : http://hub.qgis.org/projects/easycustomlabeling



You then use this menue(see pic) to perform any operations on the label like e.g. moving it.enter image description here


Tried it myself. Works fine. Let me know if it worked.



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