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?
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:
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.
The only way to get QGIS to generate colliding labels is to set this option in the Label Rendering tab of the Style Panel:
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.
- 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.
- Manually place the labels as explained in sn1ks's answer. This is very time-intensive if you have a lot of labels.
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."