How do I calculate the mean value (for a specific field of the attribute table) at the intersection of many polygons (.shp)?

I converted the polygons to raster based on the value I want to use to calculate the mean.

I am using ArcMap 10.2.

enter image description here


I finally solved the problem, it was much simpler than I´d imagined. Effectively, the Cell Statistics tool was the answer, but the result I was obtaining was a raster that didn´t comprise the total area of all my rasters. Once I added the MAX extension, it worked! Here I leave the code, in case is useful for someone dealing with a similar issue.

import arcpy

#set input, output and workspace folders
InputFolder_alfo = "C:/Users/Alfonsina/Desktop/Distance"
arcpy.env.workspace = InputFolder_alfo
OutputFolder_alfo = "C:\Users\Alfonsina\Desktop\Distance\output_prueba_alfo"

# Set the extent environment using MAXOF
arcpy.env.extent = "MAXOF"

#Create a raster list of all raster files in input folder
raslist = arcpy.ListRasters("*", "All")

# Run cell statistics
calc = arcpy.sa.CellStatistics(raslist, statistics_type = "MEAN", 
ignore_nodata = "DATA")

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.