0

I have a raster with gridsize 10m x 10m. Cells have values 1 or 2. For every raster cell I want to make a calculation using cells in a 200 cell (2000 m) radius. I want to find out the percentage of cells with value 1 within this radius. The calculation should be

"Number of cells within 200 cell radius" / "Number of cells with value 1".

I tried focal statistics and zonal statistics, but I can't find the option to input my equation. Am I looking at the wrong tools?

1 Answer 1

1

This is a large radius, so this will be computationnally expensive. That being said, focal stat is the good tools if you have only 1 and 2 values: make the sum of the cells with focal stat, then

"percentage of cells == 1" is equal to 100*(2*(number of cells in the radius)-(focal stat result))/(number of cells in the radius)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.