Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Using ArcGIS, QuantumGIS, Grass, and/or GVSIG

  • What are some of the tools and processes involved in building effective heat maps?
  • What are the plugins involved?
  • What are the major data requirements?
  • What are some of the flaws with existing heat maps?
  • What are some of the issues that heat maps cannot cover effectively?
  • How not to do a heat map?
  • Are there better alternatives (in the same context) than heat map for data representation?
share|improve this question
Although it doesn't use any of the tools you specified, you might want to have a look at this Python script as well jjguy.com/heatmap –  radek Jul 23 '10 at 22:40
Dassouki, could you clarify what you mean by "heat-map"? Wikipedia appears to think it is a choropleth rendition of an array of values. This is subtly, but importantly, different from all the replies in this thread, which assume it simply means a map of any grid- (or image-) based attribute, especially one that has been interpolated onto the grid from point data. The answers to every one of your bulleted questions will be different for a true heat map. –  whuber Nov 14 '11 at 21:15
add comment

4 Answers

up vote 46 down vote accepted

There are at least two different kinds of heat maps:

  1. Heatmaps representing concentration of points, and
  2. Heatmaps representing distributions of attribute values

Every method has advantages and problems, I'm afraid going into detail is far beyond this Q&A.

I'll try to list some methods and functions for QGIS and GRASS.

Concentration of points

If you are tracking movement of wildlife, vehicles, etc. it can be useful to assess regions with high concentration of location messages.

Tools: e.g. QGIS Heatmap plugin (available in versions > 1.7.x) or GRASS v.neighbors or v.kernel

Distributions of attribute values

Here, we're basically talking more or less about interpolation methods. Methods include:

  1. IDW

    Depending on the implementation this can be global (using all available points in the set) or local (limited by number of points or maximum distance between points and interpolated position).

    Tools: QGIS interpolation plugin (global), GRASS v.surf.idw or r.surf.idw (local)

  2. Splines

    Again, huge number of possible implementations. B-Splines are popular.

    Tools: GRASS v.surf.bspline

  3. Kriging

    Statistical method with various sub-types.

    Tools: GRASS v.krige (thanks to om_henners for the tip) or using R.

share|improve this answer
There is an interface through GRASS for kriging, v.krige (grass.osgeo.org/wiki/V.krige_GSoC_2009), but it still requires R, and the various R packages and bindings mentioned on the GRASS Wiki page. –  om_henners Jul 27 '10 at 17:52
add comment

While I like heat maps, I realize they are often mis-used.

Typically what I've seen is a process whereby the color of each pixel is based on the result of an inverse distance weighted function applied to a collection of points. Any time a map has a lot of overlapping point markers, I think it is worth considering a heatmap.

Here's a web based api.

GeoChalkboard has a good tutorial for it.

You can use IDW in ArcGIS.

share|improve this answer
Just be aware that IDW is highly sensitive to the data collection locations. If the data is clustered, for example, you'll potentially get bad mathematical anomalies. –  Reed Copsey Jul 23 '10 at 22:32
@Reed Copsey What alternative would you suggest? –  fmark Jul 24 '10 at 7:54
@fmark: There are lots of interpolation routines you can use instead of IDW, including natural neighbor/triangulation based approaches, Kriging, splining/minimum tension, etc. –  Reed Copsey Jul 24 '10 at 19:42
@Reed I've never really been concerned about mathematical correctness of heatmaps (maybe I should be). But I do think they usefully communicate clusters in many situations. Here's an example of a map I think that could be usefully rendered as a heatmap: www2.clustrmaps.com/counter/maps.php?url=http://clustrmaps.com –  Kirk Kuykendall Jul 27 '10 at 22:12
I think they're a great tool. The mathematical/statistical correctness is probably only important if you're using the results for decision making, but if it's to convey the general sense of the distribution, IDW's probably fine. (It's more a matter of clusters causing large "skews" in the heatmap results, especially between clusters, due to mathematical anomalies.) –  Reed Copsey Jul 27 '10 at 22:52
add comment

Statistically, here is how you should go about doing a heat map:

1) Integrate point features. The idea of integration is to take points that should be considered coincident and merge them together as a single location. I like to use nearest neighbor analysis and use an appropriate value from there. (For example, when doing a crime heat map, I use the average 1st nearest neighbor for the underlying parcel dataset against which the crimes are geocoded).

2) Collect events. This creates a spatial weight for all of your integrated points. E.g. if you have 5 events at a single location, it will become one point with weight 5. This is essential for the next two steps. If you need to aggregate an attribute in the events pooled, i.e. different events have higher weight, then you can use a one-to-one spatial join. Use the 'collect event' output as the target and your original integrated events as the join features. Set the field map merge rules statistically combined the attribute on the integrated events (normally with a SUM, though you can use other statistics).

3) Determine peak spatial autocorrelation using Global Moran's I. Just like it says, run global moran's I at different intervals to determine the peak band of spatial autocorrelation in the scale appropriate to the analysis you are doing. You might want to run nearest neighbor again on your collected events to determine the start range for your moran's I tests. (e.g. use the max value for first nearest neighbor)

4) Run Getis-Ord Gi*. Use a fixed distance band based on your moran's I analysis, or use the fixed distance band as a zone of indifference. Your spatial weight from collect events is your numeric count field. This will give you z-scores for each event point in your set.

5) Run IDW against your outcomes from Getis-Ord Gi*.

This outcome is significantly different from what you get with kernel density. It will show you where high values and low values are clustered together rather than just where values are high, without regard to clustering, like in kernel density.

share|improve this answer
This is a great answer and deserves more attention. –  Ari B. Friedman Oct 9 '12 at 16:24
add comment

For simple heat maps and generating countour lines I've used QGis with the Grass intergration:

  1. Load data-points
  2. Load a limiting shape – eg county boundary
  3. Create a Grass mapset
  4. Open the Grass toolbox and click on the module list to search for each tool
  5. Load v.in.ogr.qgis module and load both the point data and the boundary shape, each time remembering to click view output for each – give each a useful name like pointdata and maskshape
  6. Convert maskshape to a raster to use it as a mask with v.to.rast and add to the mapset – call it something like maskraster - this can take time for complex polygons.
  7. Load the r.mask module to force the next action to be limited to the buffer region.
  8. Run v.surf.rst to produce an interpolated grid from pointdata– choose the appropriate column as the attribute field for doing the interpolation, and call it something like rastersurface. This is the bit that takes time and generates a raster that can be used as a for of heat map or could be 3D shaded.
  9. Close the Grass toolbox
  10. Use the GDAL Raster Contours plug-in choosing the GRASS raster as input; leave the default levels value at 10, and choose an output directory where the contours shapefile will be saved. Check the “Attribute Name” and type in a name.

NB: For this to work, the datasets should be in the same projection!

share|improve this answer
Thanks for the detailed explanation. Do you think you can take a sample data set, follow your instructions and give us a sample graphical output? –  dassouki Aug 14 '11 at 15:09
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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