Calculating Kernel Densities

This tutorial demonstrates using the Heatmap tool in QGIS to calculate kernel density rasters from input point features.

 

Included in this tutorial:

  • Accessing the Heatmap tool

  • Heatmap tool parameters

  • Three example outputs

Software version in examples: QGIS 3.40 Bratislava

Tutorial Data: The tutorial includes demonstration with sample data available here.

Credits: L. Meisterlin (2026)

 

Accessing the Heatmap Tool

locating the Heatmap tool

Find the Heatmap (Kernel Density Estimation) tool in the Processing panel by clicking through Interpolation > Heatmap (Kernel Density Estimation).


Heatmap Tool Parameters

The Heatmap tool’s parameters include the standard input and output information as well as several options that determine how the density calculations are performed and the units represented by the output values.

Point layer: The input point vector layer. The selected features only checkbox offers the option to run the tool based on currently selected features.

Radius: Specify the kernel density search radius and its units (from the dropdown). This is the distance from each output cell that defines the area in which the density value (for that cell) is calculated. 

Output Raster Size: Specify either the number of rows and columns in the output raster or the cell (pixel) size. Changing any value here will updates the others.

Advanced Parameters: Expand the Advanced Parameters options to access additional options. We highlight some common parameters below.

  • Radius from field: This optional parameter will use values from the input layer’s attributes to specify a variable radius. In effect, each input point will be included within an output cell’s density calculation if it lies within the value’s distance from the cell.

  • Weight from field: This optional parameter will weight each input point by the value in a specific attribute field.

  • Kernel shape: You can specify the kernel function applied to the density calculation. 

Output options: Specify whether and where to save the output Heatmap. You can also use the checkbox option to add the results to the current map.

Algorithm Settings: Access the Algorithm Settings from the Advanced dropdown at the bottom of the tool’s main dialogue box. There you will find the Calculation Settings (the units for output densities) and Environment Settings.

the Heatmap tool’s main dialogue box

accessing Algorithm Settings

the Heatmap tool’s Advanced Parameters dialogue box


Three Examples

The examples below use the point features from the tutorial Standard Data Package as the input layer. All three examples utilize a quartic kernel shape.

Running the tool with different search radii and output cell sizes

Example 1 was produced with a 2000-ft search radius and 100-ft cell size.

Example 2 was produced with a 200-ft search radius and a 20-ft cell size.

Example 1 results, with input point locations in black

Example 2 results

Calculating a kernel density raster with values from the input attribute table

Example 3 was produced with a 2000-ft search radius and a 20-ft cell size. It weights the input points by the values in the Int_lrg field.

Example 3 results, with input point locations in black

 
Previous
Previous

Unclassified Quantitative Symbology for Rasters

Next
Next

Creating Buffers