5

It appears from the QGIS documentation that the Heatmap Plugin can generate a kernel density surface from a point map and make use of the attributes of the original points to influence this surface via the "Use weight from field" option. Does anyone know whether this plugin in QGIS performs the same function as the "Kernel Density" tool in the Spatial Analyst toolbox in ArcGIS? (in the ArcGIS tool, the "population field" can be used as a weighting option--I'm assuming that if this weight is zero, the resulting surface is essentially a "heat map"?).

  • When the weight is zero, the corresponding point contributes zero to the result. Thus, when all weights are zero, you won't get a "heat map," you will get a zero map. – whuber Oct 1 '14 at 19:26
  • Thanks! I guess the weight would actually need to be 1 for all values to produce a "heat map" as opposed to a "kernel density map". – bwilkes Oct 13 '14 at 15:15
6

I was curious so I did a small test to see if the two programs perform the same function. The quick answer is yes and no.

Let's have a look-

Random set of 100 points with a random weight value: Random set of 100 points with a random weight value

Setup KDE in ArcMap 10.2.1: Setup KDE in ArcMap 10.2.1

Setup KDE in qGIS 2.0.1: Setup KDE in qGIS 2.0.1

Compare the results. I adjusted the symbology so that the discrete values were equal interval, 6 classes, one for zeros, the rest representing their 20%. Left, ArcGIS, Right, qGIS: KDE Compare

Looks good, right? Well, there's a catch. Remember when I said:

I adjusted the symbology so that the discrete values were equal interval, 6 classes, one for zeros, the rest representing their 20%.

The values in the rasters are completely different. Here's a simple breakdown of those raster values:

ArcGIS

  • Min: 0
  • Max: 1.054002837008738e-006
  • Std. Dev: 2.149743379111992e-007

QGIS

  • Min: 0
  • Max: 2.6250930968672e-003
  • Std. Dev: 5.3712256066864-004

So although they appear the same (yes), the actual output density values do differ (no).

EDIT

Per the comment by @whuber, the two rasters were divided against each other. I did not take a sample of the two to eliminate edge effect, but I did symbololize the raster so that values 0-2,400; 2,400-2,500; 2,500-2,600; and 2,600+ were drawn.

WHUBER Suggestion

  • 4
    QGIS pre 2.6 scaled the heatmap results by default, so that the total sum of the output would be the same regardless of the parameters used. 2.6 introduced a new default behavior which disables this scaling, resulting in similar values to arcGIS's output. – ndawson Oct 1 '14 at 22:19
  • @ndawson, that's very interesting. Can you provide any source that has information on how much QGIS scales their heatmap outputs? – evv_gis Oct 2 '14 at 13:08
  • 2
    (+1) Very well done! Kernel density maps can differ in this way for the same reasons histograms of univariate data can differ: they have to follow some normalization convention (of which there are many). You could easily continue your investigation by dividing the QGIS map by the ArcGIS map: if the two algorithms are the same, the result should be a constant everywhere, approximately equal to 2500. However, the quotient will not be constant: inspecting how it varies can be revealing. (There will be edge effects which you can remove by eliminating extreme ratios.) – whuber Oct 13 '14 at 16:07
  • @whuber - I just posted a quick result for the quotient raster. – evv_gis Oct 13 '14 at 16:38
  • Thank you. You can get a more out of that result by (1) eliminating extreme values (say, those outside the interval (500,10000)); (2) displaying their logarithms; (3) using a scale based on standard deviations centered at the mean log; and (4) employing many more intervals to display finer graduations. Nevertheless, the presence of thick bands of extreme values at the edges suggests QGIS and ArcGIS may be using slightly different kernels. Possibly QGIS is using an actual Gaussian whereas ArcGIS is using a quartic approximation. – whuber Oct 13 '14 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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