Raster Analysis in Context

“Raster analysis are operations performed to alter the cell values of the raw data. The output are a result of computations on a cell-by-cell basis. The value of the output for one cell is usually ind”

In this module, we explore the raster operations namely zonal operations. We explore how zonal analysis can be achieved in QGIS.

You try:

Goal: You are a disaster manager in your region and you are required to produce a map which shows the population density of each administrative area.

  • Load the layers into a new project
  • Project the vector layer to the specified CRS and remove the initial layer loaded.
  • Using the layer generated from the above step, symbolize it to look nice.
  • Calculate the zonal statistics of each district. What is Zonal statistics? What function should you use ?
  • Style the district layer using the district_style specified below. Ensure the vector layer is rendered above the raster layer.
  • Using field calculator create a column density that has the format specified below.
  • Using an appropriate formula to calculate the population density.
  • Label the district layer using the density values generated in the preceding step.
  • Create a map that shows how the density varies across the districts.

Name Expectation

Data

zonal-stats/kzn_pop_count.tif and zonal-stats/districts.shp

CRS

EPSG:3857

Spatial algorithm

Zonal Statistics

Density column - Specifications

density, Decimal size 10, precision 6

District Style

Fill color - transparent, Stroke color - #608856, stroke style - dot line

More about

Raster operations are grouped into three types:

  • Local Operations
  • Zonal Operations
  • Neighbourhood Operation

Raster operations are cell by cell computations. Zonal operations work within groups of cells. The zones may be contiguous or non-contiguous. Contiguous zones include cells that are spatially connected, whilst a non-contiguous zone includes separate regions of cells. When undertaking zonal operations the zones can be defined as a raster or vector. When using a raster as a zone all the cells with the same value would define the zone and for polygons all the features with the same attribute.

Zonal operations can be done on single raster or multi rasters. An example of a zone can be a census district and the zonal statistics, counting the number of streams that occur in each census district.

Check your knowledge:

  1. How is population density calculated?:

    1. Population Density is the number of organisms per unit volume
    2. Population Density = Number of People/Land Area
    3. Population density is a type of GIS operation available in QGIS
  2. What is the difference between EPSG:4326 and EPSG:3857:

    1. They are just fancy numbers used to make GIS difficult.
    2. EPSG:4326 is the projection that is true for the whole world.
    3. EPSG:4326 define latitude and longitude projections whilst EPSG:3857 represent data in metres.
  3. If a user does not have a polygon with zones he/she cannot compute zonal statistics:

    1. True
    2. False