Monday, 20 May 2019

labeling - Placing elevation numbers on contours with uphill orientation and position in QGIS?


I want to orient my elevation labels uphill.


Is that possible?


I'm currently using the labeling tool from QGIS (not that one in layer settings). I want the labels curved and uphill oriented (and I would like to define how regularly the numbers are displayed). It's all for a print-map.




Answer



Here we go then, a method to get some control over contour label placement, see the picture.


The first thing I did was to load the contours. Next, on a new line shapefile, I drew a line from the top of the hill to the bottom (the labels in the picture are aligned with this). I then buffered the line and used the buffer to clip the contour layer. After that I loaded the clipped contours over the contour layer, set the symbology so that the little lines didn't render, and labelled the clipped layer using the new labelling system.


In the example shown I only used one straight line, but of course it would be possible to use polylines too, to produce better placed labels.


Oh, you only need a small buffer value, 50 metres I think I used in the example, even this might have been greater than strictly necessary.


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...