Select to view content in your preferred language

Raster Overlay: Count Pixels

3307
2
Jump to solution
10-01-2014 12:53 AM
JakobKopec
Deactivated User

Hello

 

Inside the Cell Statistics Tool I'm missing the Count/Frequenzy Method, that counts all Overlay Pixels for all input bands. Given n raster bands I want to know, how many Pixels overlay, ignoring NoData or zero values.

 

Any ideas?

 

Pixel Count.jpg

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

Does your raster really have 0 values in it?

I was considering the Greater than tool if the no data cells could be reclassed to zero, then you would simply need an input raster of zero against which all other values  could be compared.  If you do have a valid 0 value, then consider adding 1 to the rasters, then compare to > 0.  This last option would require using some code or modelbuilder to iterate through our rasters to reclass the zero, then add on one, prior to iterating through them to determine the number of those that have values > 0 on a cell-by-cell basis

View solution in original post

2 Replies
DanPatterson_Retired
MVP Emeritus

Does your raster really have 0 values in it?

I was considering the Greater than tool if the no data cells could be reclassed to zero, then you would simply need an input raster of zero against which all other values  could be compared.  If you do have a valid 0 value, then consider adding 1 to the rasters, then compare to > 0.  This last option would require using some code or modelbuilder to iterate through our rasters to reclass the zero, then add on one, prior to iterating through them to determine the number of those that have values > 0 on a cell-by-cell basis

JakobKopec
Deactivated User

Great! Thanks, that worked fine.

0 Kudos