I have a series of contour lines with relative elevations (Z value). I am trying to align the labels so that they are all on the same imaginary line. It's a process that I usually do with Autocad manually. Could someone tell me if there is an easier way in QGIS? The only result I can obtain is this:
Don't wish for your imaginary line, make it real. As in, digitize a line whereever you need it.
lineintersections for your alignment-line and the contourlines, then
join attributes by location so your newly produced pointlayer knows the elevation of the contourline it is on.
For your desired output then make your points invisible, and tell them to be labelled by the elevation you joined.
This proposal lacks how to orient the labels properly: This should be able via the field calculator using the
azimuth expression (as in, attach the azimuth of the line to all the points and use it for label rotation). Since I haven't worked with it, you will have to figure that out on your own, sorry.