I set up a model to iterate rasters and do a spatial analyst math int geoprocess. i did a subset of my entire raster collection just to make sure it would work. I have three rasters in a FGDB. My output only had two rasters? so I reran and had a different output. same results. I renamed the input rasters, same result? Essentially the iterate is grabbing the last raster and naming the output the same as the first rasters output????? Why is this happening? See circled red boxes for exactly what is happening
Are you using an inline variable to name the outputs?
yes i am. that is why i am lost/ confused why it is trying to name/ write something that already ran/ exists
It may help if we can see your model setup.
its the model named:
iterate_rasters_math_int_001
https://drive.google.com/file/d/0B9XYlRVEiA-nQk5GV2pfOW52U0k/view?usp=sharing
Darren is correct, you need to use inline variable substitution in the output name of your final raster. The output name of your raster should look like the following:
C:\globeland30\rasters4_work2.gdb\%Name%
The %Name% part will use the name of each input raster to your iterator as the output file name.
Hope that make sense.
Kyle
yes, i have the model setup with that. that is why I am confused why it is overwriting with a name that 1)it isnt and 2)that already ran
I am not sure if this is a bug?
FWIW, I think you should have the 'What FGDB do you want' as a precondition before the iteration proceeds.
Zachary,
any idea why this is happening?
I don't think file format has anything to do with this here.
I was able to get the model to work correctly. For what its worth, I changed they name of the variable to 'Output_FGDB'...I don't like using things with spaces or special characters (unlikely culprit). I made this a precondition, validated the model, saved, and then ran it through the catalog window. [I wish I used smaller rasters!].
Here is my model:
And here are the results: