Aggregating points to zones — Recipe (QGIS)
Tool-bound implementation of the Aggregating points to zones (Task) Task Schema in QGIS 4.2. Worked examples: Share of rented dwellings in Copenhagen (Example) and Dwelling size by construction period in Copenhagen (Example).
Data you need
| Role | Form | Level of measurement | Notes |
|---|---|---|---|
| Points | points | fields of any level | the population to aggregate, e.g. from Categories from register codes (Task); a 0/1 indicator field gives shares |
| Zones | polygons | nominal zone id | administrative units, or a grid made with Create grid (Tool - QGIS) |
| Summaries (output) | the zones with summary fields | ratio counts, sums, means |
Points and zones in the same projected CRS.
Summarise (Task Schema step 3)
Join attributes by location (summary) (Tool - QGIS):
- Join to features in: the zones
- Where the features: intersect
- By comparing to: the points
- Fields to summarise: the fields you need
- Summaries to calculate: e.g. count, sum, mean, median
- Discard records which could not be joined: unticked
The new fields are named <field>_<summary>. For a single count, Count points in polygon (Tool - QGIS) is quicker.
Check the sums (step 4)
Open the statistics panel (View › Statistics Panel) on the count field: its Sum should equal the number of points. A difference means points outside every zone, or on a border counted twice.
Minimum count (step 5)
Flag zones below the minimum with Field calculator (Tool - QGIS), e.g. coalesce("<field>_count", 0) < <minimum>, or handle it in the symbology (Comparable choropleth maps (Recipe - QGIS)).
A grid instead of given zones
Create grid (Tool - QGIS): Grid type Rectangle (Polygon) or Hexagon (Polygon), extent from the zones, spacing in metres, the project’s CRS. Then summarise as above with the grid as the zones.
Checked in QGIS 4.2.2, October 2026.