Hi, I am trying to mosaic a list of grids with arcpy.MosaicToNewRaster_management but keep getting a series of errors, no matter what I try. My problem seems to lie on the input rasters. Since I need to mosaic a series of grids, then the input becomes a multi value input, thus I have tried the three ways suggested by ArcGIS Desktop . Yes I am working with ArcGis 10.0
So, first thing with Python List:
ERROR 000157: Input and target dataset should have the same number of bands
Whith following code:
dem_list = ["path1\\grid1;path2\\grid2"]
arcpy.MosaicToNewRaster_management(dem_list, target_gdb, "mos_wat", varGeo_SpatRef, "32_BIT_FLOAT", "", "1", "MEAN", "REJECT")
Now, with Value Table
ERROR 000732: Input Rasters: Dataset F:\FLOODS_USA\A_FLOODS\DEM_SRTM\ADEM_10mUSA_Neue\n25w081\grdn25w081_13;F:\FLOODS_USA\A_FLOODS\DEM_SRTM\ADEM_10mUSA_Neue\n25w081\grdn25w082_13 does not exist or is not supported
Whith following code:
dem1 = "path1\\grid1"
dem2 = "path2\\grid2"
vt = arcpy.ValueTable(1)
vt.addRow(dem1)
vt.addRow(dem2)
arcpy.MosaicToNewRaster_management(vt, a_gdb, "mos_wat", varGeo_SpatRef, "32_BIT_FLOAT", "", "1", "MEAN", "REJECT")
Finally with String
ERROR 000157: Input and target dataset should have the same number of bands
Whith following code:
dem_list = "path1\\grid1;path2\\grid2"
arcpy.MosaicToNewRaster_management(dem_list, target_gdb, "mos_wat", varGeo_SpatRef, "32_BIT_FLOAT", "", "1", "MEAN", "REJECT")
For all three cases, if I print the input variable it seems to be in the correct format as bellow
path1\grid1;path2\grid2
I have also tried wraping it in quotes as to have
"path1\grid1;path2\grid2"
and I get the same problem. I have of course searched for answers here and somewhere else, and I find no definitive answer to it, since everything points to what I have already tried without success. I would appreciate any help here. By the way: paths, bands, type and projection are all OK.