I am unable to find any info on how to use ModelBuilder to run a certain spatial analysis function on each column in a table.
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.
This is for ArcGIS 10.1 (Basic and Spatial Analyst license)
arcpywhich can be run through python interpreter in ArcGIS. For exampleinterim=arcpy.sa.KernelDensity("C:/Data/MyGIS.gdb/MyLayer",field.name,100,500,'SQUARE_KILOMETERS','EXPECTED_COUNTS')will produce kernel density raster and assign to a temporary (as long as not saved) raster. Then you can save this asinterim.save(("C:/Data/MyGIS.gdb/MyLayer_Kernel_%s" %field.name). – fatih_dur Oct 19 '17 at 06:17%field.namesince field variable here isarcpy.Fieldobject andnameis its attribute, which returns the object's name. – fatih_dur Oct 19 '17 at 22:22fieldList = [f for f in arcpy.ListFields("C:/Data/MyGIS.gdb/MyLayer" if f.name.upper().startswith("C"))]– fatih_dur Oct 19 '17 at 22:24