Mosaic to New Raster not accepting Iterator output as input.

5632
14
Jump to solution
10-20-2016 01:00 PM
KevinSmith2
New Contributor II

I have an ArcGIS Pro model that iterates through a series of folders(using a workspaces iterator), passes those folder names off to a new model that contains a raster iterator. I am having trouble passing the rasters found using the raster iterator to the Mosaic to New Raster Tool(in the original model). The Mosaic to New Raster tool, is not recognizing the output from the raster iterator as an input for the tool.

Additionally, I think that the all of the output from the workspace iterator might not be being transferred as the input to the raster iterator. (I can only see the first one being transferred).

I have a very similar model that works in ArcGIS Desktop without any problems, but I would like to have the extra RAM that ArcGIS Pro affords as some of these raster are gigabytes big.

Any Help is appreciated

Kevin

0 Kudos
14 Replies
curtvprice
MVP Esteemed Contributor

Why not drop Model 1 and select the option to recurse inside the folder in Model 2? 

If you do need to build a model with 3 or four nested pieces, the complexity (and the wait to validate the model) starts to point me towards Python.

Here's a nice application to easily use arcpy.da.Walk to generate the list you need to pass to Mosaic: arcpy.da.Walk | ArcPy Café 

0 Kudos
DuncanHornby
MVP Notable Contributor

Nathan,

You must remember the golden rule when using iterators, EVERYTHING runs in the model. So look at your m2 model. You have a sub-model that cycles through the top level folder dishing out workspaces. So that runs firsts, cycles and feeds a workspace into your raster iterator. That is why you only ever get the last folder processed, that sub model has run to completion.

You need to remove the embedded m1 model from m2 and embed m2 into m1!

Duncan

p.s. It would be best practise to start your own thread and reference this thread with a link to it rather than just tag your problem to the end of someone elses as how are people going to discover your problem and solution?

XanderBakker
Esri Esteemed Contributor

Apart from all the recommendations on the model, it might be good to consider using a Mosaic Dataset for your data. It is much more efficient in term of processing (if you have access to a Standard or Advanced license).

0 Kudos
NathanSchlagel
New Contributor II

Hi Xander,

I spent a lot of time trying to get the mosaic dataset tools to work, but had trouble. I couldn't figure out for certain where the issue was; it seemed to occur when I added a raster to it that overlapped a different one, then tiles went grey and overviews would not rebuild. At the moment I'm only using the mosaic dataset to create the footprints because its the only aspect I can get to work on a regular basis. As per Duncan's note on best practice I will make a new question thread when next I try to use the Mosaic Datasets.

Cheers,
Nate

NathanSchlagel
New Contributor II

Thanks Duncan,

I will start a new thread for this. Your recommendation seems the most promising of the suggestions within my current knowledge set. I'm taking a class on Python starting next week and will get more into using it; until then, of all my experimenting I've had most success with model builder so I'll stick with that the rest of the week.
I ran the model from here, and edited it further; I'll cover in a dedicated thread.

Cheers,
Nate


0 Kudos