Sunday 25 March 2018

qgis - Separate overlapping labels


I have many point features in close distance to each other and when I label them, the labels overlap. Is there a way that QGIS automatically seperates the lapels from each other and resolves the overlap?



Answer



This is a common cartographic problem. There's no one-size-fits-all solution.


As MrXsquared pointed out, by default QGIS will rearrange labels to prevent them from overlapping. If you have too many labels for them all to display without overlapping, QGIS will eliminate some of the labels. You can override that setting by choosing the option to "Show all labels for this layer (including colliding labels" - but obviously this creates the situation you're trying to avoid.





  • Reduce the number of labels. As Erik mentioned, colliding labels means you probably have too much information on your map. Use symbology to convey the same information.




    • For categorical information, use a categorized style. You can distinguish between categories using different colors or different symbols.


    enter image description here



    • For numerical information, use a graduated style. You can use varying color or symbol size.


    enter image description here





  • Make the labels smaller, by:



    • Reducing the font size.

    • Replacing text labels with a number (or letter). Put the full text of the original label under the map as a numbered (or lettered) list.


    enter image description here




  • Increase the label spacing, allowing labels to be placed further away from the feature they label. This method works if you have multiple labels for the same feature. See here for details: Colliding labels for point features in QGIS


    enter image description here





  • Manually rearrange the labels using the data-defined placement and the Label toolbar. See this section of the QGIS user manual for instructions.



    enter image description here




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