3

I'm trying to buffer a line using Geometry Generator in QGIS (buffer($geometry,3)) However although I've set the Simple Fill join style to Miter I can't get the ends of the buffer to be flat.

enter image description here

I wanted to use a polygon for styling (rather than having the line width set to 6 map units) because it's much easier to have a semi-transparent fill with a consistent border and a line fill effect.

Is there any way to set the end cap for polygon styles or using expressions? I notice single_sided_buffer() has a parameter for join style but buffer() does not.

1

If you have line vector file that you want to buffer, you can input it to QGIS tool "buffer" (vector -> geoprocessing tools) buffer tool window

The parameter you want to change is called 'END_CAP_STYLE'. Setting it to flat (1) should give you the desired result.

  • Is this in SQL? The parameter you refer to doesn't seem to exist with geometry generator expressions (for buffer(), anyhow). – she_weeds Oct 2 at 22:32
  • 1
    I only just noticed the edit clarifying that this was for the vector geoprocessing tool. The entire point of using the geometry generator is to avoid creating a new, static layer so this doesn't address the question. – she_weeds Oct 3 at 9:48

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.