I'm trying to run 'Mosaic to New Raster' iteratively across 500 raster pairs in ArcGIS ModelBuilder. Either this tool or my model is not working. Intuitively, the model is correctly specified, but in reality it is not fully specified according to ModelBuilder, so it won't run!
DETAILS OF THE GOAL AND ISSUE: I have two sets of geotif rasters - 500 rasters in Folder1 and another 500 in Folder2. The rasters in Folder1 and in Folder2 have the same file names and differ only with respect to spatial location. For a given pair of rasters having a given file name (e.g., raster1.tif), I want to run the Mosiac to New Raster tool in ModelBuilder to create a output geotif with the same file name as its input rasters. Schematically, this would look like this:
Mosaic to New Raster (1st iteration)
- Input1: Folder1 > Raster1.tif
- Input2: Folder2 > Raster1.tif
- Output: OutputFolder > Raster1.tif
...and so on...
Mosaic to New Raster (500th iteration)
- Input1: Folder1 > Raster500.tif
- Input2: Folder2 > Raster500.tif
- Output: OutputFolder > Raster500.tif
I have tried creating a model in ModelBuilder to this end. See the picture of the same. As you can see, I used the 'Iterate Raster' tool to iterate over each of the 500 rasters in Folder1 by raster file name. The iterator directly specifies the first raster of a given raster pair in the Mosaic to New Raster tool. The raster name variable of Iterate Rasters tool, %Name%, serves to specify the second input raster of the pair as C:...Folder2\%Name% in the Mosaic to New Raster tool. The latter input is not recognised by the Mosaic to New Raster tool, however, so the tool remains unspecified and cannot run.
I don't know anything about Python scripts so hope for a solution that can run in ModelBuilder.