2

Is there any way to use a ModelBuilder variable in the neighborhood settings area for Focal Statistics?

I would like to have this value be a parameter to the model.

I cannot type anything but integers in the boxes. For the other input boxes you can use %variable_name% as a placeholder but not for the neighborhood settings.

Sceenshot of the focal statistics dialogue box

1

You cannot enter fractional values of a cell number. So for example you can't have 6.3 of a cell you are either a whole cell or not so that make sense to not allow non integer values.

If you want to enter non-integer numbers you need to be entering the distance in map units, e.g. 4.2Km rather than number of pixels.

  • Thanks for your answer. I am trying to create a tool using model builder and I want to make the cell width and height a parameter for the tool. I have multiple tools in the model that need a cell number as input and I would like them all to be the same without having to edit them each time the tool is run. For the other input boxes you can use %variable_name% as a placeholder but not for the neighborhood settings. – chaptuck Jan 11 '17 at 20:34
0

The "Neighborhood Settings" field builds a Neighborhood object, and I haven't been able to figure out how to expose the individual settings directly to use as parameters in Model Builder.

The only way that I've been able to do so thus far is to use the python interface to the tool in a separate python script, and expose what you require as explicit parameters for your script. You can then assign the values to these parameters from variables within your model.

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.