How to Calculate Zonal Statistics in 2 Steps:

  1. Gather Data
  2. Calculate Zonal Statistics
Zonal Statistics - Equator

Step 1

Gather Your Data

There is more than one way to acquire zonal statistics, with each method differing in some of the data required to execute the necessary processing tools. In our case, we will be using the Zonal Statistics tool which will require a polygon and raster layer. The polygon layer for our project will be our catchment/watershed boundary (region bordered in black) and the DEM of our region (extracted from the Equator Site Builder). If you want to create a watershed like the one we made, you can follow through the following tutorial:

How to Delineate a Watershed in QGIS

Once you have these two polygon and raster layers, we can generate our Zonal statistics.

QGIS project - Zonal Statistics

Gathered Data in QGIS

Step 2

Calculate Zonal Statistics

Now – having gathered the necessary data – we will generate the statistics using the Zonal Statistics tool:

Processing Toolbox → Raster Analysis → Zonal Statistics

Input your raster layer in the Raster layer parameter as well as your vector layer in the Vector layer containing zones parameter. Next, in the Statistics to calculate parameter, select the stats you want to generate (this will vary in accordance to your project). Once this is complete, run the tool.

  • QGIS project

Zonal Statistics tool

  • Zonal Statistics Attributes Table Before
  • Zonal Statistics Attributes Table After

Before and after calculating Zonal Statistics with the Zonal Statistics tool


You should now have an updated attribute table for your watershed polygon, highlighting your Zonal Statistics! We hope this helped, and feel free to take a look at some of Equator’s other blogs and “How-to tutorials”!