Smoothing/generalizing polygon in QGIS?

you can use:

Vector menu -> Geometry tools -> Simplify Geometries

.

simp

Beside this you can use Douglas-Peucker algorithm in postgis too, so you can use in postgis then adding postgis layer to qgis. you can find some info here about Simplify: Reduce the weight of a geometry.

SELECT simplify(the_geom,500) as simpgeom 
    FROM neighborhoods

simplfy


Aragon's answer is good for generalization. Bryan's answer is good for smoothing but is a little convoluted. Here are two alternatives for smoothing:

  • Use the GRASS v.generalizer tool from the Processing toolbox. This is the module on which the QGIS Generalizer Plugin in Bryan's answer is built. The GRASS tool allows you to use polygons so you can avoid the steps of converting to lines and back again. It is an excellent tool with a LOT of algorithms for smoothing/generalization.
  • Use the 'old-school' approach of buffer-debuffer. Simply buffer your polygons by an appropriate amount (your call depending on the nature of the data and degree of smoothing you require). Then de-buffer by applying the same value for the buffer distance but making it negative this time. If you dissolve the buffers first time, you can often simultaneously eliminate small gaps or doughnut holes if required (though this is not always desirable so consider carefully before opting to dissolve).

Smoothing often means the addition of vertices (especially with the buffer-debuffer method). After smoothing, you could then apply generalization as per Aragon's reply.


I've also had luck using the QGIS Generalizer plugin (enable experimental plugins), and then:

Vector > Geometry Tools > Polygons to lines

Then use the Generalizer plugin to smooth the lines and vertices

Plugins > Generalizer > Generalizer
Algorithm: "Chaiken's Algorithm"

Then turn the lines back into a polygons

Vector > Geometry Tools > Polygons to lines

This does a better job actually smoothing the lines and rounding the corners. It's a bit clunky to have to have to switch back and forth between lines and polys, but it works. I know that there's ways to do this via Grass as well, but I've found them difficult to setup.