2

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

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Jun 26, 2019 at 19:20

1 Answer 1

2

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

Glorfindel
1,0962 gold badges10 silver badges15 bronze badges
answered Jun 26, 2019 at 19:25
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.