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:

Asked
Active
Viewed 399 times
5
ddomizia
- 648
- 4
- 13
-
Might be possible using geometry generator. Dont know how though – BERA Feb 03 '20 at 14:26
-
2This answer can help: Placing elevation numbers on contours with uphill orientation and position in QGIS? – Kadir Şahbaz Feb 03 '20 at 14:28
-
1For something a bit complex to implement but that then becomes totally dynamic, look to this answer that uses virtual layers – Gabriel Feb 03 '20 at 19:05
1 Answers
5
Don't wish for your imaginary line, make it real. As in, digitize a line whereever you need it.
Then run 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.
Erik
- 16,269
- 1
- 24
- 43