BY the help of below script, i trying to get properties of raster using mask file. I want certain area statistics value of raster.
So far i have, but its getting error while performing the task
arcpy.env.workspace = r"D:\Annomaly_SPEI_12"
arcpy.env.Mask = r"D:\Agro_Zone\Zone-1.shp"
Mask = arcpy.env.Mask
rasterList = arcpy.ListRasters()
for raster in rasterList:
rasterObj = arcpy.Raster(raster)
bands = arcpy.GetRasterProperties_management(Mask ,raster, "MEAN")
print "MEAN VALUE: %s" %bands
Error Massage :
ERROR 000864: Property type: The input is not within the defined domain.
ERROR 000800: 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.
ERROR 000864: Band Name: The input is not within the defined domain.
ERROR 000800: The value is not a member of Band_1.
Failed to execute (GetRasterProperties).