import arcpy, inRaster = r"C:\test.gdb\myRaster" # Build attribute table if needed #arcpy.BuildRasterAttributeTable_management(inRaster, "OVERWRITE") # Create a search cursor for desired raster VALUE sCur = arcpy.SearchCursor(inRaster, '"VALUE" = 1') for row in sCur: cellCount = row.getValue("COUNT") print cellCount
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und vieles mehr. Neu hier? Erstelle ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.