Select to view content in your preferred language

Counting cells of one raster that are within a certain area of another raster

1138
3
11-27-2023 01:06 PM
Labels (2)
Hailey215
Occasional Contributor

Hello! I have pretty limited experience working with rasters and I'm hoping to get some guidance on the best tool(s) to use to accomplish what I'm after.

I have two rasters and would like to figure out how to count the number of cells in one raster that are within a specific area of the other.

See image below. The yellow area is rangelands, and the grey area is precipitation under a certain number of inches. I would like to get the count of yellow cells that are within the grey area so that I can calculate acreage of rangeland within that precipitation zone.

Any thoughts/help would be greatly appreciated!

range_precip.PNG

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor
0 Kudos
Hailey215
Occasional Contributor

Thanks! Follow-up question.. if the tool won't work because one of the rasters is a floating type, not integer, would the "Int" tool be appropriate to use to fix that?

0 Kudos
DanPatterson
MVP Esteemed Contributor

Your "zone" raster I am guessing would have to be integer, so "int" would do it IF! there is separation in the values and you dont have 1,1, 1.2, 1.3...

in that case Int(your_raster * 10 ) to scale up the values to provide separation if needed to yield 11, 12 and 13

which would be unique classes for the zones.


... sort of retired...
0 Kudos