2

When labeling a curved line in QGIS 2.2, and setting Placement to 'Curved', the behavior of 'maximum angle between curved characters' is not intuitive, and I haven't been able to find documentation on it.

The line I'm trying to label is pretty jagged (it's a hiking trail). If I leave the 'maximum angle' settings both at 20 (default), no label is drawn. If I crank the values up to 45, the label is drawn but it is very jagged just like the trail, and illegible. If I crank the values down to 30, the label disappears again.

So, it seems like these values are being interpreted like so: "If any generated character would be more than x degrees rotated from the previous character, then do not draw the label."

Whereas I was hoping the values would be used as a sort of filter / smoothing algorithm: "Rotate the characters as needed such that each character's rotation is within x degrees of the adjacent characters' rotations."

Can anyone provide a more clear interpretation?

3

Might I offer a workaround?

If the lines are indeed that jagged, would it be an option to use the Generaliser plugin, which makes a copy of your shapefile, but with smoother lines. Load that other layer, set it to have no linewidth (invisible) but label that one? The labels should follow the smoother version, while you can display the original map data as they are.

You may have to fool around with the different algorithms for smoothing that are listed, I have no clue which works best in which situation. (based on the results, it's your call which version - original or 'generalized'- you want to use for display)

Bit of info: link

  • Thanks, that seems like the best option. Maybe this would be a feature request for QGIS: add a slider (or other fields) in the label Placement tab to control smoothing coefficients when 'curved' is selected. – Tom Grundy May 14 '14 at 14:24

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.