I am trying to find the quickest way (in terms of processing speed) to find the total (sum) of all values in a raster. In other words, I am looking for a tool that will add the value for all cells within a particular raster, and just give me that value as a number. Ideally, this would spit out a table with just one row, as the "Get Raster Properties" tool does. The "Get Raster Properties" tool in the "Raster Properties" toolbox in ArcToolbox looks like it is very close, in that it provides summary statistics for a raster, but there are two problems: 1) there is not an option for "sum"; and 2) it appears to round-off the answer to 6 decimal places, and I need much greater precision than that.

The only way I've found to do this is to use the "Zonal Statistics As Table" tool and set a dummy "zone" raster that has a single value ("1") for all pixels covering my study area, so that it is finding the statistics (including sum) for all cells in the raster. However, this is pretty slow--mostly because I think it's comparing each pixel to see which zone it's in.

It seems that there should be a built-in way to get a sum of all cell values in a raster. Help!

The only way I've found to do this is to use the "Zonal Statistics As Table" tool and set a dummy "zone" raster that has a single value ("1") for all pixels covering my study area, so that it is finding the statistics (including sum) for all cells in the raster. However, this is pretty slow--mostly because I think it's comparing each pixel to see which zone it's in.

It seems that there should be a built-in way to get a sum of all cell values in a raster. Help!

and all your conversion could be done to arrays using Python as your programming platform

The number of significant digits far exceeds the number of decimal places being shown. For example, a value of 0.000000045821 is a valid value (a probability density function, where the probability for all cells across the study area sum to 1), but would be rounded to 0.000000 as it's being displayed when I use the Get Raster Properties. When I sum the grid values, if there is this much rounding in the calculations, they will sum to much less than 1. That's what I mean by erroneous.

I do most of my scripting with VBA. Is this something that might be better done with Python? I haven't done much scripting with rasters, so I'm not sure how to access the values for individual cells. Any samples you have handy for something like this?

Thanks!

Is there any reason to expect that the zonal statistics function (using a "zone" raster mask where all zone values are the same) will use single precision? When I do it that way (use a raster layer that simply has values of "1" for all cells overlaying my original raster), the "sum" I get seems reasonable.