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
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.