Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This seems like it should be a no-brainer, but I am unable to find any info on how to use model builder to run a certain spatial analysis function on each column in a table.

Problem: I have a table to sample locations and at each location there are a series of measures (e.g. temperature, flow rate, number of certain species). For each of those attributes (columns in the table), I was to run the IDW function from the surface tools.

This would be easy if I had each attribute in a separate shp/feature class, but not very efficient. I tried Iterate Feature Selection, but was unable to pass the field name as the Z value in the IDW function.

EDIT: this is for ArcGIS 10.1 (Basic and Spatial Analyst license)

Any help would be greatly appreciated! Thanks!

share|improve this question
My head is aching right now, because i am having the same issue, sort of. I have a table with climatic data (six variables) for more than 1000 days. I have split the hole table onto a table for each day, which was later joined to a shape. Now I have nearly 1000 shapes hoping ready to make a batch for IDW and regional statistics as table. I constructed a model using the model builder, with an itherator for the shape name. The problem comes with the selection of the field for the z value which will be used for the interpolation. Every table had six fields, with the same filed names. With the joi –  Santiago Restrepo Feb 25 at 17:32
add comment

2 Answers

up vote 2 down vote accepted

I believe you will need to build a small Python script and paste that into your Model. You would use the ArcPy module and build a field list on your layer:

fieldList = arcpy.ListFields("C:/Data/MyGIS.gdb/MyLayer")

and then you would iterate through the fieldList using a for loop, for example

for field in fieldList:
    #run your spatial analysis function on field
share|improve this answer
Thanks! The ListFields() is super handy. I took it out of model builder now and am trying to do it all in a Python script. I had figure there would be an iterator for that, but it now gives me a good reason to work with Py. –  Mr.ecos Mar 18 '13 at 21:02
add comment

@nmpeterson I am also trying to do the exact same thing but having a hard time to make it work, can you share how you did it in Py or model builder?

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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