Run Zonal Statistics as Table. First you need to create a zone though. We will use your rainfallvolume raster to do this. Open the Raster Calculator and input Int("RainfallVolume" * 0). This will return an integer raster of all zero's (constant value) that is the exact size and shape of the rainfall data. Use this raster as the input zones using the Value field. Use the rainfall raster as the Input Value Raster, also using the Value field.-Eric
Jamal,The zone we created only surrounds the real pixels. It isn't including the NoData pixels in the count. The input value raster is 897*563, which is 505,011 pixels. The count field you got indicates there is only 343,809 pixels. I ran this in the raster calculator - Con(IsNull("RainfallVolume"),1) which converts NoData to 1. I checked the count and it is 161,202. 343,809 + 161,202 = 505,011.Regards,Eric
Get Raster Properties tool doesn't give you the product of COLUMNCOUNT and ROWCOUNT. We should probably just enhance that tool to provide TOTAL_PIXEL_COUNT. It's still currently up to you to do the math, hence my comment "Not out of the box".
Jamal,What is the real requirement? Do you need the count of all pixels, or just the ones with data? These numbers can be very different as you have seen. Why do you need the counts? Please elaborate in detail.Thanks,Eric
I doubt you would be interested in the area of NoData, so for the most part I would avoid calculating it. I also want to point out that rows*columns*area of the cell, does not return 'surface area' in the way we use that term. That formula is giving you the 2d area of the extent. Surface area can be calculated in ArcGIS though using Add Surface Information or Surface Volume tools. Zonal Geometry can be used to get 2d area of each zone in a dataset. It sounds like you want the area of the 'real' pixels though, so you can multiply any raster by 0 and Int it, like I showed you and then put it into this tool. Because it is a constant of 0, it would be considered 1 zone. Technically, you could just convert the raster of 0 to polygon and get area that way. I don't anticipate enhancing the Get Raster Properties tool in a way that would distinguish NoData pixels from valid pixels in terms of returning a count. There are other methods for that. We can consider returning total pixels based on col/row counts.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.