# Define a circular neighborhood for a custom raster calculator function? [closed]

I have a 1 meter resolution raster containing values from 0-3 which represent increasing levels of habitat suitability. I need to identify circular regions that have contiguous pixel values. For example, I define a 50 meter radius, and I am looking for regions with values of 3. I need to know if every cell within a 50 meter radius of each target cell has a value of three. If true, then I need to return a true value (1) to the output target cell, if false, then return a false value (0).

This is similar to a focal statistics function using a circular neighborhood.

Region group will identify regions of contiguous cells, but I need the regions of contigous cells to be circular and of a minimum diameter.

I'm using ArcMap 10.2 and any help is appreciated.

Thanks

## closed as unclear what you're asking by Fezter♦, Vince, Jason Scheirer, Chad Cooper, Alexandre NetoApr 15 '14 at 10:54

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

In order to use your own equation with focal statistics, you can create a custom filter for weighted sum as a text file.

for instance

``````5 5
0 -1 -2 -1 0
-1 -2 -3 -2 -1
0 0 0 0 0
1 2 3 2 1
0 1 2 1 0
``````

Note that many kernel based filters are now available in the image analysis windows

for more complex equations, you can usually decompose as a set of operations on focal statistics, even if this could be long to write. For instance, you can have the value of the pixel at the left using

``````3 3
0 0 0
1 0 0
0 0 0
``````

and then you apply whatever function on this raster. With Python and the lazy computation, the raster will not be written until you save it, so having several steps is not a big problem.

EDIT : based on the comment

I would set all values different than 1 to 0

use focal stat with circular neighbourhood and mean

when the mean is equal to one your target cell is 1

• Thanks for your response. I don't need a custom kernel, I'm using a simple circle neighborhood. But I don't want to calculate statistics on the neighborhood, I want to return a true/false value in the target cell if all cells within the circle neighborhood have a value of 1. – Trlblzr Apr 14 '14 at 20:14