15

I need to buffer a series of lines by 40m, however I only want the buffer to come off the sides and not off either end of the line.

I know in ArcGIS there is a "flat-ends" tickbox that achieves exactly this, however unfortunately I can't use ArcGIS at this current time.

Is there any way to achieve this in QGIS?

I've had a look at some of the work arounds, but due to the scale of my datasets (national road networks) none of the ones I have found so far are feasible.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
rfreeman92
  • 153
  • 1
  • 6
  • Not sure what format your data is, but looks like you may be able to do it via PostGIS statement, http://gis.stackexchange.com/questions/1197/how-to-create-one-sided-buffers-or-parallel-lines-in-postgis – artwork21 Sep 30 '14 at 15:48

3 Answers3

13

If you use the v.buffer tool in the Grass Commands toolsets, you can make a flat buffer.

There there are two choice boxes v.buffer If you have Make outside corners straight set to No, and Don't make caps at the ends of polylines as Yes, the result should be similar to the ArcMap straight edge buffer.

The following are the 3 combinations of the above two checkboxes, note the binary combination in the layer name (0 = no, 1 = yes). v.buffer results

You should probably also run a topology fixer/cleaner before, the Grass tool tends to return funny results if the topology isn't perfect

HDunn
  • 8,626
  • 3
  • 40
  • 71
  • Excellent this is exactly what I needed, had no idea QGIS had those GRASS commands squirreled away.

    Thank you kindly.

    – rfreeman92 Oct 01 '14 at 09:18
  • NB: Is there any way to ensure that the buffers created are individual polygons and not dissolved into one giant polygon? – rfreeman92 Oct 01 '14 at 09:24
  • I am also interested in getting individual polygons and not one dissolved polygon. IS this possible? – user32882 Jul 26 '18 at 08:41
3

OpenJUMP may not suit you because all data must fit in memory but with 64 bit jre the limit is rather high. Most important, it can.

enter image description here

user30184
  • 65,331
  • 4
  • 65
  • 118
  • 1
    OpenJUMP's buffer tool accomplished this better than QGIS or Esri! – sirgeo Jun 02 '15 at 18:24
  • Just saying thanks for presenting me a software that appears to be much faster in many of these fundamental algorithm! :D – jhc Nov 27 '15 at 19:32
0

It appears that the same result can be achieved directly with ST_Buffer() by using a flat endcap with a round join, as follows:

ST_Buffer(linestring_geom,<buffer_radius>,'endcap=flat join=round')
John
  • 518
  • 4
  • 13