1

I would like to compute the area of each respective cell of a raster.

The pixels are in degree coordinates, so it is not trivial to calculate the area of each one "manually".

In R I know there is a function for this: https://www.rdocumentation.org/packages/raster/versions/2.6-7/topics/area

Does anyone have an idea of how can I do it in python?

closed as off-topic by PolyGeo Jul 10 '18 at 19:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Better reproject your raster to a metric CRS. Take the cell resolution times itself (area of one cell) and multiply with the amount of pixels in the raster – Mazu_R Jul 11 '18 at 13:02

Browse other questions tagged or ask your own question.