Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
+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 May 30 '13 at 8:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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