[GIS] How to get smooth contours from points or IDW raster in QGIS

contourqgisrastervector

Hello I'm an artist trying different ways of drawing contours in QGIS using points with income values. I've been able to import a shp file with the data, create a layer with centroids of the census blocks and create contours using the contours plugin but they're not smooth.

So then I tried creating the contours from an IDW raster but couldn't get the contours to work using extraction->contour.

How can I make the contours using extraction->contour? How can I make them smooth? I'm trying to create a 10 layer contour map of income in NYC which is accurate and smooth. What's the best way to do this in QGIS without GRASS (had issues using it in QGIS) and SAGA (had issues installing on OSX)?

contours

Best Answer

There are a couple of ways to make your contours smoother.

Looking at the contours, I suspect it's because the IDW raster is low resolution. Did you use the default size (300x300) when creating this?

Resize your IDW raster

Probably the easiest way :-

  • take your existing IDW raster and make it bigger with gdal warp (Raster > Projections > Warp).
  • Choose a larger resolution. I find that changing the raster size to 10x the original size for width and height works well.
  • make sure the 'resampling method' is not 'Near' (I usually use 'Cubic Spline').
  • Extract the contours from the scaled-up IDW raster.

You should now have smoother contours.

Generalizer plug-in

Another thing to check is the 'Generalizer' plugin and apply it to your existing contours. This has several smoothing options, but it is a bit more involved (you'll need to experiment to get good settings)

You might want to check out this question to see how this works.

Related Question