I have a series of fields that I am trying to run the IDW tool against. I'm looking for a way iterate through the feature class, using a different field as the z value each time.

This is my data: http://imageshack.com/a/img849/115/zqkc.png

I'm looking to use each field following Village as a z value. Typically I would just do this all manually but I have a ton a data that I need to run the IDW for so I need to automate it.

I've looked through the forums already and I haven't been able to find any responses that include all the necessary details for me to make this happen.

Any insight would be incredibly helpful.

  • 1
    Welcome to gis.se. It isn't clear what you want to know here - you've posted some useful background but there isn't anything with a question mark. Please ask one specific question, that can have an objective answer. – BradHards Feb 14 '14 at 21:49

I wouldn't waste my time trying to do this with ModelBuilder. It'll drive you crazy. However, you could do this trivially with Python using a pair of nested loops.


list_of_fields = ['field1', 'field2', ...]
for row in table:
    for field in list_of_fields:
        perform IDW on row with value of field
  • Thanks for the response. I have limited experience (i.e. none at all) with using python script in ArcMap so I was hoping for a solution that wouldn't require coding. But you are definitely right about it driving my crazy using model builder. There doesn't seem to be any straight forward way of accomplishing this. Do you think it is a lost cause trying to do this using only the tools in modelbuilder? – David Feb 14 '14 at 21:21
  • I would bite the bullet and learn some Python. You can thank me later :) There are plenty of resources and tutorials for learning Python and arcpy. I have compiled a list of them here: gis.stackexchange.com/a/53826/753 – blah238 Feb 14 '14 at 21:39
  • I figured that would be your response :) Based on what I've seen in modelbuilder, I think your probably right. Thanks for the resources and the advice, I'll definitely take a look at them. – David Feb 14 '14 at 21:42

You may use Iterate Field Values on your feature class for this task.

Iterates over each value in a field.

enter image description here


  • Thanks for this but the iterate field value function doesn't let you iterate the z value field. It only gives me the option of use the iterating value as a parameter for the environment settings. – David Feb 14 '14 at 21:28
  • @David, what field in you table are you referring to as your z-value, see help link/graphic above? – artwork21 Feb 14 '14 at 21:51
  • I'm looking to iterate each field (i.e. AH_7, IS_30, etc) as the z value field. So I don't want to select unique values from a field and iterate them, I want to select the entire field for the z value and then iterate through multiple fields. I thought I might be able to create a table with each field's name as a value and use that to populate the z value field but that didn't work either. – David Feb 14 '14 at 22:22
  • 1
    I managed to use your suggestion to automate the process a little bit. I used 'iterate field values' with a spreadsheet containing all my field names. Then I set the data type to 'field' and I was able to connect it with the 'z value field'. It's not as direct as I would like but it make the process a lot quicker. Thanks for the suggestion. – David Feb 15 '14 at 0:41

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.