# Multiplying Raster Value with Pixel size using QGIS?

i'm working on a map with population densities. My raster data contains values as [People/square meter] for each cell. I have per capita values of energy demand etc. which I want to multiply with the raster to get a spatial distribution of the demand, but this requires the number of people in one cell. Consequently i'd have to multiply the population density values with the area of each cell, but here's the problem:

Each cell is 0.0083 degrees but depending on the distance from the equator has a different area.

How can I extract the area values from this raster/ directly calculate population numbers of the cells?

My first try was to vectorize the raster, calculate the area for each polygon and rasterize again, but vectorizing it, QGIS consolidates cells with similar values to one polygon. From 660,000 raster cells I get 60,000 polygons.

• To an excellent approximation, the area of each cell is 0.8534 * cos(latitude) square kilometers. (0.8534 = (0.0083 * 111.300)^2.) This formula leads to a fast, efficient, direct solution. For details, see our thread about converting back from square meters to square degrees. For a slightly more accurate formula see gis.stackexchange.com/a/29743/664 -- which answers essentially the same question as this. Jul 17, 2014 at 15:08
• Thank you whuber, i'll try that as soon as I need to work with the bigger rasters. How can I get the latitude values per cell to use them in the raster calculator? Can't find this for QGIS in the forum either... Jul 18, 2014 at 8:45
• The answer at gis.stackexchange.com/a/91035/664 describes one way. Although it is couched in the language of ArcGIS, it applies to any raster GIS with flow accumulation capabilities, which includes GRASS. There are many other ways, too, including generating the latitude grid with a script and computing the Euclidean distance grid from a line representing the Equator. Jul 18, 2014 at 13:00
• the time has come that I need a bigger raster with the area values, but after reading several times the related posts (thanks for that @whuber), I don't get it done, so I will just open a new thread... Jul 21, 2014 at 15:00