3

I would like to create a map of point density of vector features /archealogical sites/ per hectar in QGIS /something like in an attached figure/. I doubt if the kernel density is a proper tool for this objective. Are there any other more appropriate procedures?enter image description here

Or in another words what do numbers in KDE output actually represent. Is it so that:

  1. "Raw values" in KDE = number of points per cell ?,
  2. "Scaled by kernal size" = number of points per map unit ?
  3. Is the term "kernal size" a synonym for the chosen radius or does it refer to the cell area " ?
4
  • What data do you have? How large is your area of interest? – Erik Jan 25 at 14:39
  • One vector layer containing cca 320 points representing particular sites covering an area of roughly 30 squarekilometers – Jan Zachar Jan 25 at 14:47
  • Please edit your question so it contains all relevant information. 30 km² could be a 1 km wide strip 30 km long. Have you had a look at the symbology form "Heatmap"? – Erik Jan 25 at 14:57
  • area: cca 7,5 x 4 km. I have looked at the symobology of the heatmap but i am no´t sure what the scale numbers actually represent beside the global notion of incresing / decresing density. As far as i remember in "point density" command in Arcgis there is an option "Area unit scale factor", which defines units of density, e.g.points per square units. But i am not sure how it works in case of heatmap in qgis. Does the output in heatmap represent points per square units? – Jan Zachar Jan 25 at 15:38
2

You can use a combination of the GRASS tool v.surf.rst for interpolation and than create contour polygons with GDAL contour polygons (available since GDAL ver. 2.4). As an alternative, instead of the GRASS tool, you might also use the SAGA tool Multilevel b-spline interpolation for interpolation. All these tool are available in QGIS.

To demonstrate it, I downloaded a points layer representing temperature measurements from 153 stations in Switzerland.

Version using GRASS

  1. Run Menu Processing / Toolbox / GRASS / v.surf.rst and keep default values (especially tension parameter = 40). Select the attrribute representing the value you want to visualize. At the bottom of the dialog window (not visible on the screenshot), check only the box to create an output for Interpolated RST and de-select the eight other ones (you don't need them).

GRASS v.surf.rst dialog window to create interpolated raster from point layer

  1. Output is a black/white raster. Use Menu Processing / Toolbox / GDAL / Contour polygons (if you have only the option GDAL contours, you can run the tool setting the parameter -p to create contour polygons instead of lines if GDAL >/= 2.4). Select the interval between the contours (in my case: 1).

GDAL Contour polygons dialog window: creating contour polygons from raster interpolated with GRASS v.surf.rst

  1. Now apply a graduated style to the resulting polygon layer. Here is what I got, took less than 5 minutes:

Output contour polygons from raster interpolation with GRASS v.surf.rst


Version using SAGA

Everything as above, except that you use Menu Processing / Toolbox / SAGA / Multilevel b-spline interpolation in step 1:

SAGA Multilevel b-spline interpolation dialog window

The output is slightly different, also the interpolated values. This method is better to represent local extremes, it has more small sized details, whereas the first version is more even and balanced over greater distances. So always reflect what you want to represent. Also play around with the parameters and try to understand how they influence the result. The sites linked above are a good starting point.

Output contour polygons from raster interpolation with SAGA Multilevel b-spline interpolation

Compare the two outputs here, same scale. As you see, not only values are different, also the extent of the output is different:

Comparing contour polygons from raster interpolation GRASS v.surf.rst vs.  SAGA Multilevel b-spline interpolation

Applying a layer mask (polygon for Switzerland, layer rendering style: inverted polygon), I got this (SAGA output), representing interpolation for temperatures measured at 135 stations all over Switzerland, 25th of Jan. 2021, 16:35 h (Central European Time / UTC+1):

Switzerland temperature 25. Januar 2021

And this is what I get with Kernel Density Estimation (Heatmap), where only the density of the points and no attributes are visualized. Be sure to set the values accordingly for radius and output raster size. Choose a radius long enough so that buffers for neighbouring points will overlap, but also short enogh so that not all (or almost all) points fall inside the buffers. Choose an appropriate value for rows and columns that the raster doesn't get too large: several hundreds or a few thousands normally are OK.Pixel size will automatically adapt: the more pixels you have, the smaller their size will be.

enter image description here

2
  • Thanks a lot for detail post, but i am not sure if this is what i am looking for. In fact cucial is the following post:gis.stackexchange.com/questions/251570/… with so far unanswered question: "Raw values" = number o fpoints per cell ?, "Scaled by kernal size" = number of points per m2 (my layer unit is meter), Is the term "kernal size" a synonym for the chosen radius or does it refer to the cell area " – Jan Zachar Jan 25 at 17:11
  • Added information for KDE to my answer. There are different ways to set parameters (advanced parameters), try to understand the concept behind it or just try different Kernel shapes to see the differences. Your question is so general that it is difficult to give a clear result. Best try a setting and come back with a focused question concerning the output/the problems you encountered or consider providing your point data to have a better impression of what you need. – Babel Jan 25 at 17:31

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.