I have a layer of points which I would like to depicted as a heatmap concentration of points for visualization.

In QGIS 1.8 I tried the built-in heat map plugin, leaving the default values as is, and got this grey box.

What's the next step after getting this layer produced by the heatmap plugin? I'm hoping to produce something similar to this output from here. http://www.sethoscope.net/heatmap/

P.S. I actually tried this and the output was beautiful but couldn't get the image as a layer into qgis.

enter image description here

  • 2
    There is an excellent tutorial on using the heatmap at qgis.spatialthoughts.com/2012/07/… Dec 1, 2012 at 1:45
  • It could be a issue with your software configuration. I had exactly the same output with Quantum GIS 1.8.0 (standalone), but the output on QGIS nightly/Ubuntu with the same data looks fine.
    – Lukas
    Aug 23, 2013 at 8:16

2 Answers 2


On using the heatmap plugin

This discussion should shed some light on how this plugin works:

the procedure in which pixel values are computed is explained in the Context Help. Its just a linear assignment, say for a buffer of 10 pixels, and decay of 0, the central pixel has a value of 1, 2nd from center pixel has 0.9 and so n upto the 10th pixel with value 0. Its then added along for point by point. So the more the number of points, the more the pixels' value. http://idvux.wordpress.com/2009/08/21/heat-maps/ has a nice explanation of various types of heatmaps (value interpolated, frequency). This tool generated a frequency heatmap. So there is not much of algo space left.

Note that the buffer is specified in pixels! So the real question is how the pixels are calculated.

In GRASS this would be specified in the region settings. If you don't mind getting used to GRASS, it offers a lot more advanced options than the Heatmap plugin does.

On styling the results

In the style tab (of the raster layer's properties) you can go to the "contrast enhancement" section an select "Stretch to MinMax". The resulting picture shouldn't be a grey box anymore but show the densities in greyscale.

If you want the results to look like on the website you posted, you'll want to select "Colormap" instead of "Greyscale". Then go to the third tab called "Colormap" and create the colors to match your data.

Tip: You'll probably want to change "Color interpolation" on the "Colormap" tab to "Linear". But give it a try.

  • It's likely that I'm still missing a few things here. I still get the same map with a different color. Perhaps I need to tweak the default settings for the heat map plugin are: radius = 10, decay = 0.1. ?
    – n1kn0k
    May 7, 2012 at 11:22
  • here's a picture of what I got so far: bayimg.com/eAOfgaaDh. Would appreciate any nudge to the right direction.
    – n1kn0k
    May 7, 2012 at 12:28
  • which settings did you use for this image? have you tried the color map with linear color interpolation? have you checked the raster values? what range are they in ?
    – underdark
    May 7, 2012 at 13:05
  • I followed the instructions you gave in your answer, including linear color interpolation. re raster values. I'm curious about that, all I have are zeroes.
    – n1kn0k
    May 7, 2012 at 13:45
  • 2
    Is it not 0 and 1? Or just zeroes? You may have used too small a buffer radius - your heatmap is calculating the density of points over far too small an area, so the average is either "1" or "0". Try putting a much bigger buffer radius and experiment.
    – Simbamangu
    May 7, 2012 at 15:28

I was generating similar graphs due to some confusion over the CRS. Basically, you need to make sure that both your project and your vector layer are using the right CRS. I was able to fix this problem by doing the following:

  1. Open the Project Properties menu and select "Enable 'on the fly' CRS transformation". Select "WGS 84 / World Mercator" as the CRS.

  2. If the CRS on your vector layer isn't "WGS 84 / World Mercator", right click your vector and Save As... to change it. From what I understand, this extra step is necessary--it's not sufficient to specify the CRS in the layer properties menu.

  3. Verify your results in the scale bar using View -> Decorations -> Scale Bar. If you aren't seeing an expected range (in m) in the scale bar, something may have gone wrong in steps 1-2.

  4. Run the heat map plugin according to the instructions. Modifying the radius param should give you results consistent with the scale in the scale bar. E.g., if your data points cover 10 km, you might try a radius in the 100 - 500 m range. If the resolution of the raster is too blocky, check the "Advanced" box and reduce the Cell Size a bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.