I am Performing iterative Mosaic in ArcPy I have 920 tiles of MOD09A1 data with Band 4 only. I need to mosaic every two tiles in one I wrote a code but its not working: Here is the code below import arcpy from arcpy import env from arcpy.sa import * import math import numpy as np arcpy.env.workspace = "F:\MOD09A1\v6\Reprojected\B4" arcpy.env.overwriteOutput = True arcpy.CheckOutExtension("Spatial") env.overwriteOutput = True outPut = "F:\MOD09A1\v6\Reprojected\B4" name = "mosaic.tif" """Note, there are multiple ways to define a spatial reference, here I am pointing to a .prj""" sr = "F:\GIS\Asim.prj" bands = 1 method = "First" clMap = "First" # Create raster list rasters = arcpy.ListRasters() count = 0 while count < 460: listcount = 0 listcount1 = 1 arcpy.MosaicToNewRaster_management(rasters[listcount,listcount1] , outPut , name , sr , bands, method, clMap) count = count + 1 listcount = listcount + 2 listcount1 = listcount1 +2

Similar questions and discussions