Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
See chat.stackexchange.com/rooms/939/gis. Not an answer, I'm afraid. Nick. –  nhopton Jun 5 '12 at 10:51
    
Do you strict to use only QGIS? Have you considered of using other software to prepare data for labeling? –  Alex Markov Jun 5 '12 at 18:54
    
I also would use other software, if its open and free :) –  MAP Jun 5 '12 at 19:36
    
May you read this articl How to generate contours using point data in Quantum GIS (QGIS) and –  ajmj Jul 21 '13 at 11:51

4 Answers 4

up vote 8 down vote accepted
+50

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. Regards, Nick.

enter image description here

share|improve this answer
    
Creative method. I might borrow this idea for future maps. –  Sue Deforest Jun 11 '12 at 16:45
2  
Looks nice, very good idea, Nick! But it sounds like a lot of work to do for a 1000km² area with hundreds of hills and mountains... :) –  MAP Jun 11 '12 at 17:12
1  
Bit of a dirty hack, don't you think? :) –  blah238 Jun 11 '12 at 19:43
1  
Yup! But that's a compliment in my book :) Yes, it would be a fair amount of work Martin, but quicker than shifting point labels about I think. You could draw lots of lines for buffering in the same layer and as I mentioned before they wouldn't have to be straight. It wouldn't be a good idea to cross them though, I think. Nick. –  nhopton Jun 11 '12 at 19:55

Using parallel placement together with "bellow line" and "line orientation dependent position", I managed to put the labels on the uphill side always.

enter image description here

enter image description here

Curved placement currently seems to ignore line orientation though. (I reported the behavior.)

Also, it doesn't seem possible to achieve upside-down labels, if you were aiming for that.

share|improve this answer
    
orientation is how you know where "uphill" is relative to the contour, even if the labels are upside-down. –  Mike T Jun 9 '12 at 21:53
1  
Thanks! But its not working very well. The orientation is still orientated to the line angle, not the to the uphill side like 1700m and 1900m or the contour numbers on the hills on the left side. But thanks! –  MAP Jun 10 '12 at 6:53
    
@MikeToews I'm aware of that but currently it doesn't seem possible to create upside-down labels currently (as I mentioned in the answer). –  underdark Jun 10 '12 at 12:12
    
'Rules' is too strong a word, but there are conventions about the labelling of lines and the new labelling system does a good job of respecting these. I think if you wanted to select where on the line the labels appear you would have to break the lines into appropriate sections. Nick. –  nhopton Jun 11 '12 at 12:24
    
There might be another way of handling contour label placement, let me think about this. –  nhopton Jun 11 '12 at 12:34

What you could do is to make a point file from the contours with an attribute of the elevation (You can do this using any profile from line tool). Then add in the point the aspect value (You will need the aspect raster but that is easy to produce) and finally rotate the elevation label in the points according to the aspect (in fact it will need to be 180 degrees + aspect, because aspect is the downhill direction). You can style the points so they don't show. Hope this helps, it strongly depends on the details of your data, if the aspect doesn't match the contour direction it can be quite annoying.

share|improve this answer
1  
(+1) Clever approach--and general enough to work with many GISes, and very flexible, too. (Unfortunately this solution does not address the requirement that labels curve with the contours.) Welcome to our site! –  whuber Jun 11 '12 at 12:50

Often, contour line vertices are capture in such a way that the uphill is always at the same side of the line. Maybe it is the case of your data...

share|improve this answer
    
That seems to be the case for QGIS Contour plugin. But that still leaves the question of how to handle the labels. –  underdark Jun 9 '12 at 18:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.