My model consists of a for loop, where the original raster is hillshaded from different angles. I want to combine the resulting images to a single multiband image.

What I already tried was to put the loop results together with Collect Values and then merge them with Composite bands tool. I found that it is possible to use result of Collect values as an input of Composite bands, but Collect values returns just one value, regardless of how many iterations there are, so the final output raster's bands are all the same. This is definitely not what I want.

Now I do it without any loop, but having eighteen or even more same tools in one model is not very elegant. If it was possible to do this with a loop (especially in the model builder), I'd like to know how.

EDIT: after Composite Bands, I run Principal Components, and the result is quite fine. I can do other analyses too (in other models), but I don't want to drop the model with Principal Components. While maintaining it, I don't like that my model looks like this:

full model

My question is: how to replace the column of hillshade tools and output with a loop? Is it possible within Model Builder?

1 Answer 1


If I understand your question properly, you should use raster algebra to produce a single band raster rather than Composite Bands to produce a multiband raster. Sounds like you are calculating multi-direction-oblique-weighted (MDOW) hillshades. As you know the MDOW hillshade is a combination of hillshades at various azimuth directions (e.g. 0, 90, 180, 270 degrees) usually for cartographic purposes. The attached model and screenshot of the raster calculator should help you produce the MDOW hillshade or a similar product.

enter image description here

enter image description here

  • +1 because you helped me (I should make a MDOW model along with the Principal Components-based one), but I can't accept your answer because it didn't help me in what I was asking about. With recent addendum, my question should be clear now.
    – Pavel V.
    May 30, 2013 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.