I'm writing a Python toolbox and would like to build in a check for raster data within the user-supplied area of interest. This piece of code works most of the time:
if (str(arcpy.GetRasterProperties_management(chsaoi, "ALLNODATA")) == "1"):
arcpy.AddWarning("No raster coverage in input OID {}.".format(row[1]))
But when the polygon is very large, this check seems to fail. Even when the entire input feature class has raster coverage, the "ALLNODATA" check returns '0'.
Can someone help me come up with a better way to do this?