I have a polygon with many columns. I want to convert into raster. I could do it one by one. But I want to iterate for each column of the polygon by model builder or any other way. Here you can see the attached table of the polygon. For example I want to make one raster for Abst85, another one for Abst91, .....Then save them in separate
This is not something that can be easily automated in model builder as there is no iterator for fields within a dataset.
You can achieve what you are asking with the following python script.
import arcpy # Input layer fc = r"C:\Scratch\sdr_subnational_data_dhs_2008.shp" # Create a list of field names fieldList = [f.name for f in arcpy.ListFields(fc)] # Remove any non numeric or system fields fieldList.remove('FID') fieldList.remove('Shape') # Set output workspace and cellsize arcpy.env.workspace = r"C:\scratch" arcpy.env.overwriteOutput = True cellsize = 0.018 # Main loop for fn in fieldList: rn = "ras_" + fn + ".tif" arcpy.FeatureToRaster_conversion(fc,fn,rn,cellsize)