I want to multiply the precipitation values (mm) of each pixel of a raster by the area corresponding to each of these pixels under R.

At first, I directly multiplied the raster by the average pixel area (Total area / number of pixels). But if we work on a global scale with the WGS84 projection, in reality the pixel area at the equator and in the high latitude regions is very different? That is why I am asking this question.


The raster package has a pixel area calculation function for unprojected rasters. Given a RasterLayer named r


area(r) * r

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.