4

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. enter image description hereIt'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: enter image description here

4

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.

| improve this answer | |
  • Thank you! I tried it and it works perfectly! – ddomizia Feb 3 at 17:05

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.