3

I will explain it by an example :
In scale 8000 the width of a road is 2 mm = 16 map units.
If I use the unit mm, then width at any scale will be 2 mm. In scale 32000 I find a width of 2 mm is too much.
If I instead use the unit map units, then the width at any scale will be 16 map unis. In scale 32000 the width will be 16 map units = 0,5 mm, which I find too small.
In scale 32000 I want a width of 1 mm. This I could get, if I could calculate the width by a formula :
width = sqrt(32000/scale) mm
Is that possible in QGIS ?

1 Answer 1

7

You can build an expression in the line width setting that would look like this:

sqrt(32000/@map_scale )

@map_scale is a variable in the expression builder, and sqrt is a function available in there as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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