2

I am working with a global raster dataset (WGS84 projection) where the value of each grid cell equals a rate (g N m-2 yr-1) (r_rate). I would like to calculate the average rate (i) for the whole raster and (ii) for 10 different zones, which are specified by another raster (r_zone).

I managed to calculte means for r_rate for each unique value in r_zone with the "Raster Layer Zonal Statistics" tool, however, different grid cells have different areas (grid cell area increases with latitude); so I was wondering how to calculate the area-weighted mean of all values in r_rate by zone.

  • Is there tool that does this automatically, or
  • Is there a tool to create a raster containing the area of each grid cell (r_grid_area)? That would allow me to do the calculation manually by multiplying r_rate by r_grid_area, then summing the resulting values by zone and dividing by the sum of r_grid_area-values in each zone.
2
+50

The reason that your "... different grid cells have different areas.." is because your data is stored in WGS84, wherein its dimensions are represented as degrees. You can solve this by reprojecting all your data to a Coordinate Reference System that uses feet or meters for its dimensions, and then redoing your analysis.

Following the reprojection, you'll know the area of each raster cell by multiplying cell length by width. With this knowledge, calculating zonal area is simply counting the number of cells in each zone and multiplying that value by cell size.

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.