I am trying to iterate a series of feature classes (polygons) in model builder to convert a series of polygons to rasters, however, I am having an issue with the output file names.
After inserting the "iterate feature class" tool into the model builder window, and linking my gdb storing all the polygons as the input, the output feature (green bubble) automatically becomes the name of my first polygon. As a result the model that I attempt to run seems to recur to that named polygon rather than then going to the next polygon in the list. Output rasters are created, but overwrite that file name rather than generating a new raster with a new name that matches the subsequent polygons.
What am I doing wrong?
Answer
Here is the model, it uses inline substitution as described by Aaron. Note the output of the Polygon to raster tool is ..\fGBD_Scratch.gdb\ras_%Value%. Value is coming from the iterator which in this case was set to FID to hand out unique rows. So the first raster dataset would be ras_1, then ras_2, etc.
No comments:
Post a Comment