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?
-
2The cartographer says: Colliding labels indicate too much information on a map, either reduce the amount of data, or resort to symbology. Nevertheless, could you provide a screenshot of some worst case areas?– ErikNov 7, 2019 at 12:43
-
no not really, sorry :D. A colleague told me that he has this situation oftentimes and asked me what to do in case this happens again– DGISNov 7, 2019 at 12:52
-
Have you tried this solution: gis.stackexchange.com/questions/178698/… ?– ErikNov 7, 2019 at 13:02
-
1By default the automatical displacement is already enabled. You can try to play with the settings a little bit or use a smaller font size and stuff like that. But in my opinion the automatical displacement does not do a very good job. So the only option left is to place them manually.– MrXsquaredNov 8, 2019 at 14:22
1 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.
Here are a few different strategies to deal with overlapping labels:
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.
- For numerical information, use a graduated style. You can use varying color or symbol size.
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.
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
Manually rearrange the labels using the data-defined placement and the Label toolbar. See this section of the QGIS user manual for instructions.
- You can supplement your rearranged labels with callout lines that connect each label back to its feature. See here for instructions: Label callout lines to the closest point on the label