Similar question here: How to combine more iterations of a for loop to bands of a single raster?

I have downloaded over 100 Landsat MSS and TM images with separate bands, and I want to combine bands as a single file with multi-bands by the composite bands function. However, I got stuck in using the ArcGIS model builder. As an example for TM images, my idea was to use six submodels (iterate raster) to gather 6 TM bands (except thermal), and combine bands, but each iterate raster function only outputs one raster, instead of multiple rasters. The files were organized by years. In other words, each year may have MSS and TM bands together, but MSS and TM bands did have specific file names.

Any further suggestion?

  • What is the file structure for the downloads? – Aaron Dec 13 '13 at 23:29
  • Those files are in tif. – Vicky Liau Dec 13 '13 at 23:36
  • How have you organised your downloaded Landsat data? Are all the bands for each scene in their own folder? So you have a root folder with 100 folders, each containing the 7 individual tiff files? – Hornbydd Dec 24 '13 at 14:30
  • @Hornbydd I reedited the description. – Vicky Liau Dec 25 '13 at 15:08
  • So as an example you have a year,lets say 2001, in this year you have 3 scenes and they are all TM.So in your 2001 folder you have 21 Tiffs each with their specific scene and band number name? – Hornbydd Dec 25 '13 at 20:17

I don't think you have helped yourself by lumping all the rasters for a single year into a single folder. It would have been much better to have sub folders in each year folder that were the individual scene. This would have allowed you to have separated the TM and MSS scenes and you don't end up mixing bands from different scenes.

Having said that you could try to use a raster iterator with a wild card set then ignore the raster that gets spit out but use the name as an inline substitution into a calculate value tool to create the full name you desire for a band and have these collected in a collects tool which would be one of your input parameters into the band combination tool.

Better still abandon model builder and do this all in python.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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