1

I have problem where the street text elements overlapping place text elements in QGIS. Both elements are in separate layers. How to express in QGIS 3 that street name layer wont overlapping place name layer? Do you have idea or template about advanced street name labeling in QGIS?

Example in Helsinki

5

If the labels of both layers are applied by QGIS, by default QGIS will place them so they don't collide or overlap.

For example, see this set of streets and points:

enter image description here

I added new points (red stars) directly on top of the street labels. As I added each new point, QGIS rearranged the labels to avoid conflicts. Notice that some of the new points don't have labels. QGIS omitted some labels because there isn't space to label every point and street.

enter image description here

The only way to get QGIS to generate colliding labels is to set this option in the Label Rendering tab of the Style Panel:

enter image description here

Turn off this setting for both layers: Show all labels for this layer (including colliding ones), in the Rendering tab of the Label Style panel.


If the labels are not rendered by QGIS, eg because they're part of a basemap, you're out of luck. QGIS can't avoid putting other labels on top of them because it doesn't know where they are. This is one of the tradeoffs that comes with the convenience of using a pre-made basemap. In this case, you have some options, but they're not great.

  1. Replace your basemap with an unlabeled basemap (the QuickMapServices plugin has a few). If you need street labels, get a street layer (eg from the QuickOSM plugin) and use it to label the streets.
  2. Manually place the labels as explained in sn1ks's answer. This is very time-intensive if you have a lot of labels.
  3. Manually create a polygon layer with polygons covering each of the street names. Set the option on the other layer to "Discourage labels from covering features." Increase the priority of this criterion to "high weight."

    enter image description here

  • Thanks, do you have any hint where define buffer between text object? I like to try as small value as possible, because I need to get as many names as possible but without overlapping – Mickeler Aug 6 at 12:51
-1

Right click one of the layers -> properties -> Labels

there you should find the option "Placement". Change it to "Offset from Point" and pick your desired location!

Screenshot

  • Thanks, problem is not text offset from point but street name should avoid overlapping place name text – Mickeler Aug 5 at 10:59
  • are the labels real labels or are they "hard printed" in a raster-file? – sn1ks Aug 5 at 11:57
  • Place names are points (green dots) and they should be placed like now, street names are lines and those labels should avoid place name text overlapping – Mickeler Aug 5 at 12:24
  • how many overlapping occurences are we talking about? can you just create text labels as geometry and then move them by hand? – sn1ks Aug 5 at 13:03
  • The manual work is not option, I have used mapnik earlier where overlapping are avoided automatically and hopefully I find similar option in QGIS – Mickeler Aug 5 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.