Iterating through a folder of rasters to perform a batch Mosaic to New Raster output

5208
5
04-13-2017 12:03 PM
TomHolton
New Contributor

Hello fellow GIS friends,

I'm trying to iterate through a folder of .sid files to perform a batch Mosaic to Raster, which l want to create a single mosaiced output. Currently, my model is set up like this:

I set up the Iterate Rasters tool like this:

I don't believe the Wildcard option is necessary, because I selected .sid as the Raster Format. I've tried it with a wildcard and without. After that I did not have any other unusual field entries in the Mosaic to New Raster tool. This tool was set up like this:

I did not put a .tif extension on the Raster Dataset Name with Extension option because it did not seem to like the .tif extension (This could be a reason why my model is failing, but I don't really think so.)

I've tried this same model with other Iterator options (i.e. files, workspaces) and have had no success. I've also tried this same model but with out the Collect Values model tool.

The model runs and finished in about 1 second and says "Completed", but has no output.

I would love to understand where I'm going wrong with this. Learning how to do this would help me save a ton of time in the future.

Thank you all for your help in advance. Thanks so much!!

- Tom

0 Kudos
5 Replies
AbdullahAnter
Occasional Contributor III

Remove the number of the first character in name of raster. Try to start name of raster with text .

curtvprice
MVP Esteemed Contributor

Are you entirely sure you want to do this? The .sid files will uncompress dramatically (10-100x), fill your disk, and the final results will probably display slower, after a lot of processing required to create the mosaic, rebuild pyramids, etc.

You may instead want to create an unmanaged mosaic dataset or raster catalog, so you can view the data seamlessly without having to physically combine and mosaic it.

And yes,  Abdullah is right on, names in ArcGIS should never start with a digit!

TomHolton
New Contributor

Thanks so much. I'll try that. That could be a better way of doing it. 

- Tom

0 Kudos
CodyBenkelman
Esri Regular Contributor

Tom

You didn't say where you want to use the resulting output - if you're working in ArcGIS, by far the best solution will be to use a Mosaic Dataset which is intended for just this sort of scenario.  See What is a mosaic dataset?—Help | ArcGIS Desktop  (This has been available since 10.0 - features change depending on version but you presumably aren't on 9.x?)

If you must eventually export this to a single mosaicked image in a file on disk, you can do that, but as Curtis noted you *will* see an increase in data volume.  If you're only working within ArcGIS, you should be able to build a Mosaic Dataset of MANY source files in a matter of minutes, and use it immediately.   

If you have issues with some images not being visible when you zoom out, or with black "noData" from one image obscuring underlying images, be sure to Build Footprints and also Calculate Item Visibility for the mosaic.  You may need to build Overviews which are reduced resolution views, but the SID files have built in pyramids that may fill that need. 

You may also want to review the downloadable script at (there's also sample data) at this link

http://www.arcgis.com/home/group.html?id=b65f2601e0084e32afab3eb488fa8a67&q=preprocess&t=group&start...  

which includes a GP tool interface for building mosaics of SID files and automatically does the Build Footprints step.  Look for the tool named Create Source Mosaic, and under Footprint, choose "Remove black edges around imagery"

TomHolton
New Contributor

Thank you so much! I realized this just a few days ago, but much of your information is helpful. Thanks for the link. I'll check it out!

0 Kudos