I have a raster that I need to divide by X in a model. I have hundreds of values I need to divide it by. What I am trying to do is create a list of values, and use the iterator to loop through them and divide my raster by that value with the Raster Calculator

Ex) If I want 10, 15, and 20, I will make a list of those three, start the model, and it will run three times.

How do I do this?

I've been messing around with the multivalue iterator with no success.

Here's what I have right now:

enter image description here

1 Answer 1


It's slightly roundabout, but I've done this in ModelBuilder with success (although I am using the same method to create a constant raster):

First, create an empty .dbf (table) in your directory (using ArcCatalog). Next, add a new column and call it 'value' (or whatever metric you are using). Enter however many values you need. The OID column will auto-populate, but we can ignore that.

Save your edits to the table, and in ModelBuilder, set it up in the iterator in the following way:

enter image description here

The multivalue iterator isn't what you're looking for. When you add an iterator, select the 'Row selection' option. Next, input the table you just made, and in the 'Group By Fields' section, select the 'value' (or whatever you called it) column. Link the table and the value to the raster calculator.

Lastly, in the raster calculator, you'll want to divide the raster by '%Value%', since that value changes (check the link below for inline substitution to read about how this works). You'll probably want to change the file outputs, or they will be overwritten each time. Maybe something like "Land_%Value%". If you run with 10, 15, and 20, you'll get outputs of Land_10, Land_15, and Land_20.

Inline variable substitution


Your Answer

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

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