I have vector data for rivers including their width at various points. From what I have seen so far, QGIS 3.8 can set the line width only per linestring, no per segment.

Is it possible (maybe with a Plugin) to control the width of my rivers as they become larger (after inflows), or do I have to split them up into several segments (which messes with feature selection, which is why I'd like to keep each river as one linestring).

closed as unclear what you're asking by Jochen Schwarze, Fran Raga, TomazicM, xunilk, LaughU Sep 9 at 13:03

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Other than with expressions, you can use the line-width-assistant - it's probably easier because you don't need expressions (but you can, if you want, see below).

Select the assistent, select the source ( field that contains the values/width-information in your attribute table), than update values (that automatically selects min./max. values - otherwise set them manually) and then set width from... to ... to choose the min. to max. range of your style (like from 0.1 to 2 mm). You might also use scaling.

If you are into writing expressions, the source-field can also contain an expression - use the expression-symbol ε for that.

See screenshot for details: QGIS line-width assistant

  • I understand this lets me set the width by some variable. But I don't see it letting the same linestring (river) be smaller at one end and wider at the other. – Tom Sep 6 at 22:50
  • Don't you have a variable for that? You wrote you have width at various points - so just use this as input. If not: are the segments of the rivers in the flow-order (from up- to downstream)? Than you could use the fid-column for that. For better answers, the format and attributes of your data is needed. – babel Sep 6 at 22:56
  • I do have the data, but don't know where to store it. If I split up every river into multiple linestrings, I know how to make it. But can one linestring have different width at different points? – Tom Sep 6 at 23:25
  • 1
    OK, so that means you first have to connect your data with the line - the layer does not contain this information? And yes, with this method, your river must consist of multiple linestrings with each linestring having a certain value (width). With this method, it is not possible to stye one linestring to have different width at different points. But see here: anitagraser.com/2017/04/17/… – babel Sep 7 at 14:03

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