I am trying to get raster properties using a Mask file for pixels that fall within mask, script will calculate that area statistics only.
Below is my script I am working on, but its showing an error
import arcpy arcpy.env.workspace = r"D:\Annomaly_SPEI_12" Mask = r"D:\Agro_Zone\Zone-1.shp" rasterList = arcpy.ListRasters() for raster in rasterList: rasterObj = arcpy.Raster(raster) print raster bands = arcpy.GetRasterProperties_management(Mask ,raster, "MEAN") print "MEAN VALUE: %s" %bands
Property type: The input is not within the defined domain. The value is not a member of MAXIMUM | MINIMUM | MEAN | STD | TOP | LEFT | RIGHT | BOTTOM | CELLSIZEX | CELLSIZEY | VALUETYPE | COLUMNCOUNT | ROWCOUNT | BANDCOUNT | ALLNODATA | ANYNODATA | SENSORNAME | PRODUCTNAME | ACQUSITIONDATE | SOURCETYPE | CLOUDCOVER | SUNAZIMUTH | SUNELEVATION | SENSORAZIMUTH | SENSORELEVATION | OFFNADIR | WAVELENGTH. Failed to execute (GetRasterProperties).