Make a Cluster Map
This page will guide you through making a cluster map with QGIS.
First, add or turn on the dougFirs layer from earlier.
- Open Symbology from the Layer Properties.
- Change Symbology type from Single Symbol to Point Cluster
![]()
- To begin, let’s just hit Apply and see what happens.
First off, you’ll notice not all points were added to a cluster group. You can now adjust the distance (cluster radius) so that all Douglas Firs are within a cluster group. (The distance is on the screen, not in the real world!)
For instance, here is the cluster map at a cluster radius of 10mm and 100mm. 

- Choose
40mmas your Distance to start.
Cluster Symbology
As it is, the cluster points themselves are very small and difficult to see. We can adjust the symbol size by clicking on the Cluster symbol at the top of the dialogue window.
From here, click down into to both Font Marker and Simple Marker to adjust the size and color of the symbol and text respectively. (Note: for this step, it’s important to adjust the symbol and text separately.)
To see the results of your edits you have to click OK a couple of times. You’ll have to re-open the Symbology Property dialogue window each time. Once satisfied, save your QGIS project.
Adjusting Symbol Size
You can adjust symbol size by building an expression. The expression can be built twice at the levels of Font Marker and Simple Marker respectively, or you can build it once at the overarching Marker level. The latter is what we will do.
- Keeping the Cluster Symbol set to Single Symbol, go down to Marker Size and click the additional options all the way to the right. Go down to Edit.
This will open the Expression Builder. At the top of the middle panel you’ll see some relevant suggestions, including @cluster_size. Go ahead and double click it to add it to your Expression. (Note that this value can also be found under the Variables option should you be building this expression from Simple or Font Marker.)
Now, click OK and OK again, and then Apply to see what this looks like on your map canvas.
Clearly, in this circumstance, simply sizing the cluster symbols according to the number of features clustered produces an illegible map.
Return to the Marker properties (open Cluster symbol at the top of your Symbology dialogue window by double clicking it), right-click Size and go down once more to Edit.
- Replace the current expression with
@cluster_size/5
Click OK, OK, Apply again to see what this looks like. Better!
While much better, the very small clusters are quite hard to see. You could address this in multiple ways: (1) changing the Font Marker expression to increase the label size for small points; (2) elaborate your Marker level expression to increase the size of smallest symbols and/or decrease the size of the largest symbols; or (3) increasing the distance (clustering radius).
For example, this is what your map will look like if the distance (clustering radius) is set to 50mm. As you can see, that already makes a big difference.
Perhaps you wanted the largest symbol (the cluster of 441 douglas firs) to be slightly smaller. To achieve this, you’d simply go into the Marker level expression and edit it to build a sort of if/then statement.
The following statement simply says that for all symbols whose cluster size is over 400, set the symbol size to the cluster size divided by 7, where as for all others, keep it divided by 5.
case
when @cluster_size > 400 then (@cluster_size/7)
when @cluster_size <= 400 then (@cluster_size/5)
end
If you save this edit and return to your map canvas, you’ll see only the largest point has been adjusted. However, it is now the same size as the cluster of 314. So, you can see how if you go this route you might end up having to create an elaborate expression that distinguishes and adjusts for multiple discreet ranges.
This tactic is perhaps more useful when applied to a handful of too small points given a lesser distance (clustering radius). For example, blow we can see our original distance of 40mm but the smallest cluster points adjusted
Loading last updated date...