I have a folder of annual raster land cover maps that are 56x56m spatial resolution. I would like to resample them to 30x30m using a for loop in that folder. I think I am making a small error but unsure of what it may be. The function works but is only able to resample and save one file then it stops.
import arcpy, os from arcpy import env arcpy.env.overwriteOutput = True env.workspace = r"C:\Users\Documents\rasters" outFolder = r"C:\Users\Documents\new_rasters" rasterList = arcpy.ListDatasets("*","Raster") for inRaster in rasterList: outName = os.path.join(outFolder,str(inRaster)) outResampled = arcpy.Resample_management(inRaster, outName, "30", "NEAREST") outResampled.save(outName)