I am trying to retrace some steps. I was working experimentally and discounted the results and then after further analysis a few weeks later it was something that was useful. I need to remember what the procedure was, or find another way to get the same answer.
Using ArcGIS 10.1
I have a raster layer with a given hydrology values in cm I have a polygon layer with tree canopy classifications (1 for areas with tree canopy cover, 0 for polygons with no canopy cover)
I want to get pixel counts for the entire polygon layer for so that I know for each unique hydrology value what the counts of canopy and no canopy pixels are. The final goal is to build a stacked histogram in excel to show the proportion of canopy and non canopy pixels at various hydrology levels.
I think I may have used zonal statistics in some manner, but I would appreciate any opinions.
I have tried it and did use it for other parts of this analysis.
Maybe I used it wrong, but I have polygon id numbers with a canopy classification, a count of pixels within that polygon, and then the min max mean etc of the raster values (I think that is what I am seeing).
What I want is the count of each unique hydrology value (which I have when I created the attribute table for the entire raster) broken down into the two tree canopy cover classes.
You will have to use your hydrology raster as dataset that defines the zones and your canopy polygons (converted from polygons to raster) as your value raster. The result will give you all the statistics you need:
The COUNT will give you the area of each zone (if you multiply it be cell size) The SUM will give you the number of pixels with canopy per zone MEAN * 100 (or SUM / COUNT * 100) will give you the percentage of canopy per hydrology value
Some considerations: If the zone input is a raster dataset (which it is), it must have an attribute table. This means it has to be of type Integer (cannot be Float). The attribute table is usually created automatically for integer rasters, but may not be under certain circumstances. You can use "Build Raster Attribute Table" to create one.
You can also Reclassify your hydrology values into meaningful classes and use those classes as zones.