Hi,

I'm trying to calculate the area of multiple rasters on a cell by cell basis, that is from decimal degrees to square meters.

I've put together an equation that calculates that (see attachment) but as I'm very new to python I'm having difficulties trying to get the X Min, X Max, Y Min, Y Max values for each cell into the equation.

Any tips and trick that I can use to accomplish the task would be greatly appreciated.

Thanks

Toni

I'm trying to calculate the area of multiple rasters on a cell by cell basis, that is from decimal degrees to square meters.

I've put together an equation that calculates that (see attachment) but as I'm very new to python I'm having difficulties trying to get the X Min, X Max, Y Min, Y Max values for each cell into the equation.

Any tips and trick that I can use to accomplish the task would be greatly appreciated.

Thanks

Toni

As I'm dealing with Decimal Degrees here I'm not sure I would get the area right. The equation takes that into account.

I'm pretty sure there is a way in Python to call XY Min/Max for each cell so I can introduce those values into the equation.

many thanks

Toni

1. Run RasterToPolygon_conversion to arrive at a polygon Feature Class. http://resources.arcgis.com/en/help/main/10.1/index.html#/Raster_to_Polygon/001200000008000000/

2. Then go through a SearchCursor, set the shape extent for each row and this would get you the X Min, X Max, Y Min, Y Max values. Perhaps you could just populate a list or data frame with which you could pass back to your process/calling application.

(sorry no working code to show on this one but you could probably whip something together pretty easily).

Problem is that when I convert from raster to polygon some cells get merged together so I would lose the true area of several cells and I do need to get the area right for each cell prior to calculating volume.

Thanks

toni

You can use the Fishnet tool to create a polygon fishnet using the extent and cell size of your raster. You can then use the Search Cursor to return the xmin, ymin, xmax, and ymax of each polygon.

Toni