Buffering only sides of polygons in QGIS?

Starting with a polygon (or several polygons):

enter image description here

Run "Polygons to Lines":

enter image description here

Then "Explode lines". This won't look any different but if you enable "Show feature count" on the Layers list you'll see there's more features, like 4 for every rectangular polygon.

Then "Single sided buffer" on the exploded lines will get you this as long as you buffer on the correct side, which for me was the "Right" side, seen here with the original polygon:

enter image description here

It might depend on which way round your polygon was digitised, in which case you might need to buffer both sides and then there must be another step to work out which one you need to keep...


You can convert your polygons to polylines first and then perform a single sided buffer. Both are algorithms that can be found under Processing > Toolbox.