lstRasters = arcpy.ListRasters("*") logfile = open(r"c:\temp\pixels.txt", "w") for raster in lstRasters: rows = arcpy.SearchCursor(raster) for row in rows: logfile.write("Value of " + str(row.value) + " = " + str(row.count) + " pixels" + "\n") logfile.close()
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.