[GIS] How to Calculate Custom Zonal Statistics

arcgis-10.0arcgis-desktopqgisrasterzonal statistics

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.

Best Answer

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.