Calculate volume of adjacent cells, so you get total volume in groups of depressionsvolumes

742
5
05-16-2017 11:13 PM
JensJensen
New Contributor II

Hello

I've got a raster that represents the water depth at a specific return period for a whole municipality (e.g. a lot of cells both with neighbours and single cells). The grid is a 10x10 m, so I know I can calculate the volume of each cell as depth x 10 x 10.

What I then need is to group these together, so that I get the sum of all connected cells, preferably I then need to convert that to a vector/area/polygon with the total volume.

So basically all individual raster cells that touch each other need to be summed up and grouped together.

I've got 3d analyst and spatial analyst license along with Standard Arc license.

Any help would be much appreciated.

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

Regiongroup is what you can use to produce the groupings.  The table will give you the number of cells in each group which multiplied by 10*10 will give the volume.  See the 'how it works' style link in there for further information.  If your groupings are ridiculously large, then you may have to tile the input raster to ensure that it completes

JensJensen
New Contributor II

Thank you for the quick reply. I get an error 000864,Input raster: The input is not within the defined domain. ERROR 000863: Invalid GP data type. The raster is a GeoTiff with float values I think, is that an issue?

Edit: I can see it must be an integer type. So I should try to multiply my values with 10000000 (or there about), convert to Int (using Int toolbox) and then try again?

0 Kudos
DanPatterson_Retired
MVP Emeritus

yes it needs to be an integer raster.... just multiply by a factor and convert to int like   int(x * 10)  you don't need to keep nanometer precision, decimeter would be a factor of 10.  I suspect if you make the scaling too fine, you are going to end up with way too many regions.  

JensJensen
New Contributor II

Alright, I've tried what you suggested with the below output. I'm not quite sure (even though I've read the How it works) what I'm looking at to be honest. (Might be I'm just a bit slow).

Input was Int_RasterCa3, which is the depth in each cell Unit: Centimeter. The output RegionG_Int_1 has a whole different spectrum, also when I use Identify it doesn't look like adjacent cells are grouped?

Greatly appreciated the help Dan

0 Kudos
DanPatterson_Retired
MVP Emeritus

I would suggest at this point that you have many many single valued regions.  If you want to keep those that is fine, but otherwise you may want to remove those.  If it worked though, maybe you could mark the thread closed.

0 Kudos