Select to view content in your preferred language

Get count of pixels except no data values

3390
2
12-17-2012 02:53 AM
ArditSulce
Occasional Contributor
Hello,

Does anyone know how to do that in a quick way for a big number of raster datasets? A list of counts output would be the best solution.
0 Kudos
2 Replies
SteveLynch
Esri Regular Contributor
Use the IsNull tool. Output raster will be integer with a table and the count for value =1 will be the number of NoData cells and count for value=0 will be the number of cell that have data
0 Kudos
JakeSkinner
Esri Esteemed Contributor
I am assumming the raster datasets are floating point rasters, and therefore do not have an associated attribute table.  Do you have the 3D Analyst extension?  If you do, you can use the Raster Domain tool to create a single polygon feature class of the raster boundary. 

Then, if you have the Spatial Analyst extension, you can use the Zonal Statistics as Table tool.  Use the output from the Raster Domain tool for the input features, specify your raster dataset, choose an output table, check 'Ignore NoData in calculations', and specify ALL for the Statistics Type.  The output table will have a COUNT field which contains how many pixels (excluding NoDATA) are within your raster dataset.
0 Kudos