try: arcpy.GetRasterProperties_management(input, "STD") print "Statistics exist" except arcpy.ExecuteError: arcpy.CalculateStatistics_management(input) print "Statistics were calculated"
# Pseudocode: while True: try: arcpy.FunctionThatNeedsRasterStatistics(raster) break except arcpy.ExecuteError: arcpy.CalculateStatistics(raster)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.