[GIS] Aligning points labels to another line in QGIS

labelingqgis

These days I've found very difficult to position my label points parallel to lines such as rivers and streets.

I have these two shapefiles, one is the point shape with names and the other is the polygon shape with the Streets.

This is the visualization:

enter image description here

Then when I'm trying to align the "Name" of the street parallel to the "Street" Shape with the label settings and there is no option to do it.

The result I am expecting is something like this:

enter image description here

Can anyone help me on this?

Best Answer

This seems a data management problem for me at first sight. I strongly doubt if it's good practice to have n labels for a distinct line in form of point dataset (seems like a Smallworld approach for me, and if so, i think there must be an attribute for the text_rotation somewhere ...).

Some possible approaches:

a) If you really want to label your points automatically, the task would be to derive the orientation of the nearest line segment to each point, store this in an attribute and make use of 'data defined override' for the rotation of point labels (if you still don't have it, see above).

b) If you do not have too much data, you may consider placing the labels manually, refer to https://www.youtube.com/watch?v=JNQCaT9GH7A or Move label in QGIS? for example or g**** for 'qgis move labels'

c) My favourite solution would be an additional attribute to your linestings containing the road name, with very many blanks in between the words, then use placement option 'curved' to place the label as you desire. The result will look sth. like

enter image description here