Iterating through rasters inside multiple geodatabases

706
1
09-06-2018 07:31 AM
RyanFennell
New Contributor

Hello,

I have a folder with a thousand geodatabases. Each geodatabase has a single raster dataset that I need to export to IMG format. Then I need to mosaic the exported IMGs. I tried running the attached model without the mosaic dataset process, but it just runs without returning a result. I think the issue is that the rasters are in geodatabases. Is there a way to do this in ModelBuilder? My Python skills are rusty. 

Thanks,

Ryan

0 Kudos
1 Reply
Robert_LeClair
Esri Notable Contributor

Instead of Iterate Rasters, how about using Iterate Workspaces using a wildcard of *  and the Workspace Type set to FOLDER.  The next GP tool to connect would be the Workspace to Raster Dataset tool.  From there, run the Create Mosaic Dataset GP followed by Add Rasters to Mosaic Dataset that connects to the FOLDER created above.  Mind you, this is all top of my head for workflow but I think it could work.

0 Kudos