I'm trying to generate LST from landsat tiles using modelbuilder in ArcMap. I have used Iterators and Sub-Models inside the Main Model but the problem is that whenever I run the Main Model, it only runs once. Another issue is that the "Name" string that comes with the iterator is not being imported into the main model (It is specified in the output of sub-model) Screenshots of the model shared.
1 Answer
Your main model running once makes sense as I think the logic is flawed. For Sub mod 5, 4 and 10 - They iterate over a directory looking for B4, B5 and B10 rasters.
As a Landsat scene only has 1 B4, B5 and B10 raster you get 1 raster feeding out of these sub-models. Hence the whole main model runs once.
I suspect you have a conflict in your sub-models with regards to the name being created by the iterators. They are both called Name, so which is it? Best to give them unique names.
You need to rethink your logic if your intention is to point it to a folder with many sub-folders that are individual scenes each with their collection of raster band datasets.
-
I have provided rasters of 2 landsat images in the same directory (e.g B4_20131128, B4_20131227) and provided B4 as the wild card. Same is done for other bands too.– Rao TahaJun 25, 2019 at 11:55
-
That is your problem the iterator cycles over the b4 rasters and passes out the last raster, same for your other sub-models. As there is no downstream processing in your sub-model the result is always the last raster. You are trying to run 3 sub-models in parallel. I would abandon model builder, it would be much easier to script this in python.– HornbyddJun 25, 2019 at 12:06