I built a model in ArcMap 10.3.1 to quickly repeat a process with multiple raster images stored in the same folder.

The idea was to have the model iterate through the rasters , then have the pixels in all of the rasters be multiplied by a certain constant value using Times, after which the model would run those output rasters through the Zonal Statistics Function and output a Final Table. I included the Parse Path step in there because I was having trouble running the Zonal Statistics step with the .tif at the end of the filename when I was simply using %Name% for my inline variable substitution.

My Model

I was having a lot of issues with this model, and finally managed to get it to (sort of) work, except now, instead of iterating through all the rasters, it only creates an output table for the first file in the "Actual" folder where the input data is stored. Instead of saying "Raster" on the output bubble from the iterate rasters step, it just says the filename for that first file, "A010216.tif", and only generates its output at the end.

How do I solve this?

I managed to fix the model in two different ways: (1) By removing the iterator step and just having the model accept a single raster as an input, it worked just fine (2) for some reason adding a Set Null step to change zero values to NoData/Null worked really well, and it let me use the Iterator without any trouble.

Here's a picture of solution number 2 (I also added a couple more steps to the model and those worked fine as well!

Model with solution

  • Without seeing how you have set up the zonal stats tool it is difficult to comment. Add a screen shot of how you have set the tool up. Worth stating that what you visually see on the green blobs in modelbuilder is the variable name, if you right click on them and OPEN them you'll see what it is actually passing, in your case the full raster path from the iterator and a full table path for the zonal stats tool. I suspect this is the source of your problem. – Hornbydd Jan 21 '18 at 23:05
  • Okay so I managed to get the model to work, but completely by accident. I wanted to add to the model to complete a couple of steps; in my process, between the X_%Value% output and the Zonal Statistics step, I added a Set Null step to transform all the zero values in my raster into NoData/Null. As soon as I did that, the whole model ran perfectly. Oddly enough, before I put the set null step, the model ran just find with only a single raster as an input, just not with the iterator. I can't add an image to the comments, so I will add an updated version of my model to my first comment. – zoomerang93 Jan 22 '18 at 7:27
  • 1
    You don't/can't add images to comments, if people are requesting extra information pertinent to the original question you are expected to amend (as you have) the original question. So you did the right thing! – Hornbydd Jan 22 '18 at 13:00