Home / GIS and Open Map Data for Beginners

QGIS Heatmap: The Renderer for a Picture, the KDE Algorithm for a Raster

An aerial view of a city grid at night

Photo: Carlos Reyes / Pexels

A heatmap answers the question every point layer whispers: where do they pile up? Crime reports, tree plantings, species sightings, delivery stops, a thousand dots that individually say little and collectively show a pattern with hotspots and deserts. QGIS gives you two instruments with the same name and different natures. One is a symbology renderer, a way of drawing points that smears them into a glowing density surface on screen, instantly and reversibly. The other is a Processing algorithm that computes kernel density estimation into an actual raster file, with parameters that carry statistical meaning. Confusing them is the standard beginner error, and it matters, because only one of them produces something you can measure, publish, or defend. This guide builds both and teaches you to choose on purpose.

Interactive tool

Build the Heatmap: Renderer or Raster Checklist

Check off each step as you finish it. Your progress stays on this page.

0 of 6 complete

0% done

The Core Idea: Density Is a Surface, Not a Pile of Dots

Kernel density estimation replaces each point with a smooth mound of influence, highest at the point and falling to zero at a chosen distance called the radius or bandwidth, then adds all the mounds together. Where points cluster, the mounds stack into hills; where points are sparse, the surface stays flat. The shape of each mound is the kernel: Quartic, Triangular, Uniform, Triweight, and Epanechnikov are the shapes QGIS offers, differing in how influence decays with distance. A Uniform kernel gives every location within the radius equal credit, a plateau with a cliff edge. A Quartic kernel, QGIS's default, peaks at the center and curves smoothly to zero at the rim, which is why it usually looks the most natural. The resulting surface's units are density, points per unit area, possibly weighted, and every choice you make, radius above all, shapes the story the surface tells. A heatmap is therefore an argument, not a photograph, and the parameters are its premises. State them when you publish, or expect a knowledgeable reader to discount the picture entirely.

Route One: The Heatmap Renderer, a Live Picture

For exploration, the renderer is unbeatable because it costs nothing and updates as you think. Select your point layer, open Layer Properties, Symbology, and change the renderer dropdown from Single Symbol to Heatmap. Two controls matter immediately: the radius, which sets how far each point's influence spreads in pixels or map units, and the color ramp, which maps low density to high. Click around: increase the radius and hotspots merge into regions; decrease it and the surface sharpens into separate incidents. The renderer's virtues are speed and honesty of a particular kind: nothing is written to disk, the points remain the data, and the picture confesses it is a view. Its limits are the mirror image. The surface cannot be queried, contoured, fed into another analysis, or exported as data, because it does not exist as data. It also recalculates with zoom and style, which makes it a thinking tool rather than a record. Use it to find the pattern and to choose parameters; then, when the pattern matters, compute it properly with the algorithm.

Route Two: The KDE Algorithm, a Real Raster

Open the Processing Toolbox and find Heatmap (Kernel Density Estimation) under Interpolation. This is the instrument that produces a file. Its parameters deserve a slow read. The point layer is your input. The radius is the kernel's reach in layer units, the single most consequential number in the dialog, and the next section is devoted to it. The output raster size is set by rows and columns or by pixel size; pixel size should divide sensibly into the radius, because pixels much larger than the radius throw away the smoothness you computed, and pixels far smaller merely inflate the file with interpolated confidence. The kernel shape defaults to Quartic. The decay ratio shapes how the kernel's influence falls toward its edge in the renderer's sibling logic and matters where offered. And the weight field is the quiet powerhouse: choose a numeric attribute and each point's mound scales by its value, so a heatmap of stores can weigh by revenue, of incidents by severity, of trees by canopy size. Run it and you own a raster: style it with singleband pseudocolor, query values, clip it, combine it, cite it. This is the heatmap that survives peer review.

A dense crowd during a festival in a city
A dense crowd during a festival in a city

The Radius: The One Decision That Is the Analysis

Every heatmap parameter matters, but the radius is the analysis wearing a number. Too small, and the surface is a constellation of private spikes, each point its own island, showing where points are rather than where density lives. Too large, and the whole city glows in one undifferentiated blob that agrees with every hypothesis and informs none. Choosing well is reasoning about the phenomenon, not about the slider. Ask what distance means in your data: for pedestrian incidents, the few hundred meters of a walkable cluster; for disease cases, the reach of the transmission you are studying; for retail demand, a drive-time translated into distance. Then test two or three candidate radii and watch which structures persist across them; real hotspots survive a range of radii, while artifacts of the parameter appear and vanish with it. Report the radius you chose and why. A heatmap whose radius was chosen by the phenomenon and defended in one sentence is research. A heatmap whose radius is whatever made the prettiest picture is decoration, and reviewers can tell the difference at a glance.

Styling: Pseudocolor With a Conscience

The KDE raster arrives in grayscale values, and styling is where it becomes readable or misleading. Apply singleband pseudocolor from the layer styling panel, choose a ramp that reads as intensity, pale to saturated, and set the classification to a continuous interpolation so the surface stays smooth. The conscience part: set the minimum and maximum deliberately. Automatic stretching to the single hottest cell can wash the rest of the city into invisibility, while clipping the top of the range sacrifices the peak to reveal structure everywhere else; either can be right, but choose it and, in publication, note it. Add a legend that says what the values are, density of what per what area, weighted by what if anything. A heatmap floating without units invites the reader to see crime waves in coffee purchases. The map's job is to show the pattern; the legend's job is to keep the pattern honest, and a heatmap is one of the few visualizations where the second job is harder than the first.

Common Failures and Their Tells

Four failures recur in QGIS heatmaps, each with a fingerprint. The checkerboard or spiky surface means the pixel size is too coarse for the radius, or the radius too small for the data; refine the pixels relative to the radius. The surface that hugs the edges of your study area and fades suspiciously at borders is edge effect: points just outside the boundary, which you did not load, would have contributed density inside it, so surfaces near borders understate truth; load a buffer of surrounding points when the phenomenon ignores your boundary, and let it. The heatmap of a city that perfectly mirrors population density is the null result wearing colors: of course incidents cluster where people are, and the analytical move is to normalize, dividing by the population surface or comparing against the expected distribution, before claiming a hotspot means anything. And the beautiful map with no stated radius, kernel, or weights is the failure of nerve covered throughout this guide: unreproducible by construction. Our broader QGIS tutorials build the surrounding skills, layers, processing, and layout, that turn a good heatmap into a finished, defensible map.

A Worked Example: Sighting Reports in a City Park System

Make it concrete. A parks department loads 4,000 geotagged sighting reports of an invasive plant, one point each, and wants crews sent where the problem concentrates. The renderer comes first, radius dragged across its range while the ecologist watches: at tiny radii the map is static, at huge radii the whole park system glows, and between them three watersheds hold persistent hotspots at every setting. Those survivors are the story. The algorithm then computes the real surface: radius set to 300 meters, the distance a crew treats as one work site; pixel size 25 meters, fine enough to honor the radius without bloating the file; Quartic kernel; no weight field, because a sighting is a sighting. Styling clips the ramp's top few percent so mid-density structure stays visible, and the legend states the recipe in full: kernel density of sightings, 300 meter Quartic kernel, 25 meter cells. The department overlays trails, and the map immediately earns its keep: two hotspots sit far from any trail, meaning the survey effort itself is biased toward paths, a finding about the data that no one had asked the map for. That is a heatmap doing its real job, not decorating a report but changing what the team does next, and every choice that made it trustworthy is a parameter stated in the open.

Related Guides

If this page answered part of the question, these GIS and open map data guides cover the rest of the same ground:

Frequently Asked Questions

What is the difference between the QGIS heatmap renderer and the heatmap algorithm?

The renderer is a symbology style: it draws a live density picture from your points, updates as you pan and restyle, and stores nothing you can analyze. The Processing algorithm, Heatmap (Kernel Density Estimation), computes an actual raster file with density values you can query, style precisely, combine with other data, and publish. Explore with the renderer; produce with the algorithm.

Which kernel shape should I use?

Quartic, the default, is the right starting point for most data: it peaks at each point and decays smoothly to zero at the radius. Triangular decays linearly, Uniform gives flat credit within the radius, and Triweight and Epanechnikov are alternative smooth shapes. The radius choice changes your result far more than the kernel does; pick Quartic, spend your judgment on the radius, and compare kernels only if the surface will be scrutinized.

How do I choose the heatmap radius?

From the phenomenon, not the picture. Decide what distance represents meaningful clustering for your subject, a walkable cluster, a service area, a transmission range, then test a few radii around it and keep the structures that persist. State the radius and the reasoning wherever the map is published; an unstated radius makes the result unreproducible.

What does the weight field do?

It scales each point's contribution to the density surface by a numeric attribute. Instead of every store counting once, stores count by sales; instead of every incident counting once, incidents count by severity. Leave it unset for a pure count density. Weighting changes the question the map answers, so say so in the legend.

Why does my heatmap fade near the edges of my area?

Edge effect. Density near a boundary is computed from points inside your dataset, but the real phenomenon continues past the boundary, and the missing outside points would have contributed. Where possible, include a buffer of points surrounding your study area when computing, and treat border-zone values with suspicion in interpretation.

Photo credits: Carlos Reyes (Pexels); Kafeel Ahmed (Pexels). Photos are served from this site; follow the credit to the library page for the original.