I have seen several discussions about zonal statistics and similar processes for summarizing rasters by polygons, however I have a question that I can't seem to find an answer to. Most of these past questions ask about summarizing 1 raster at a time.

Currently I have about 60 separate raster files (ascii but can be converted to .tif if needed) and polygon shapefile counties for several states. I would like to summarize the 60 rasters by county. I imagine the attribute table will have each county as a row and the mean of each raster as columns.

Correct me if I'm wrong, but it seems the zonal statistics tool only does 1 raster at a time and batch processing wouldn't fix that. Also, I believe the zonal statistics tool output is a raster, correct? I would like the results of each raster to be added to the polygon shapefile attribute table.

Is there another way to do this? I am open to python or R solutions.

  • Just write a loop over your rasters? What's the problem? – Spacedman Apr 24 '17 at 16:03
  • Ok, I guess that sounds reasonable. I assume this is what I'm looking for? stackoverflow.com/questions/36986206/… I haven't done it before myself, but it looks simple enough. I was just hoping there would be a tool for this kind of thing. – Steven Hunter Douglas Apr 24 '17 at 17:27
  • Upon using the zonal stats loop, that isn't the tool I'm looking for, it creates a single raster output with the zonal stats. I want the raster values to be appended to the shapefile attributes, like the multi-value to points tool, but with polygons and statistics. – Steven Hunter Douglas Apr 24 '17 at 17:39
  • Do you want to use "extract"? – Spacedman Apr 24 '17 at 19:50
  • No, I want to calculate the mean for 60 rasters by counties and join all 60 means to the county shapefile. I've found this thread, gis.stackexchange.com/questions/78971/… But I haven't been able to get a working model yet. – Steven Hunter Douglas Apr 24 '17 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.