I'm looking for the way to perform some calculation with each cell in neighborhood 3x3 and assign value to center cell. For example I'd like to sum z1 with z5, z2 with z5 etc. and then assign average from that to center cell.

enter image description here

I know that I should use something like focal statistics tool, but with my own condition. So far I didn't find any tool for that.

Does anyone have a solution for me?

  • I removed your ArcPy and Python tags because for those you would need to include a code snippet. In any event I think this one may just need ArcGIS Spatial Analyst. – PolyGeo Nov 12 '16 at 23:05

If you use focal statistics, you can set up your own irregular kernel to accomplish this task quite easily. See how focal statistics works for detail on how to structure the simple text file for the irregular kernel. Alternatively with old Arc/INFO AML and grids or new Python/ NumPy arrays, you can use neighborhood notation to solve such a task.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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