I have a vector polygon shapefile outlining counties for which I have a raster of nighttime-luminosity data. I've been able to compute Zonal Statistics in ArcGIS 10.0 using Zonal Statistics as Table and simply selecting the polygons as the first feature class option. However, I'd like to get some more stats than those that are available with the pre-packaged Zonal Stats. Specifically, I'd like to get counts and values -- for instance, the number of pixels with a given luminosity value in each polygon. Does anyone know if this is possible? If not in ArcGIS, in QGIS, perhaps? Thanks.
there is another function called "zonal histogram" in ArcGIS (http://help.arcgis.com/en%20/arcgisdesktop/10.0/help/index.html#//009z000000w6000000.htm). With the table you can extract anything you want. It is however recommende to resample your nightime data before use in order to have an integer image.
Don't forget to set the pixel size equal to the resolution of your image when you use this tools because ArcGIS often uses a coarser resolution to reduce the computational cost.
For a count of "lit" pixels--or of any other kind of cell value for that matter--simply create a binary indicator grid. This is a grid with ones at the cells where the values are to be counted and zeros elsewhere: it should be clear that the zonal sum of these values counts the cells.
To create an indicator, exploit the fact that true values will be stored as ones and false values as zeros. If, for instance, a "lit" value is a positive value, simply compare the original grid to zero (using ">" in a raster calculator). There is no limit to the complexity of the logical criteria you can use in creating indicator grids; they can even be based on multiple grids. That makes this an extremely general and flexible technique for counting anything in a grid (or image) within (nonoverlapping) zones.
This question--and the answer--generalize the one at Finding zones with nodata in ArcGIS 9.3.