I have national woody vegetation raster files for Australia for years between 1988-2017. These files are separated into spatial tiles with the same name. So, what I would like to do is combine raster files with the same name together. Here is my code:
import os, arcpy workspace = r"C:\Users\lawtond\Rasters\Woody" list_raster=  # the list must exist before you can append walk = arcpy.da.Walk(workspace, type="GRID") output_location = r"C:\Users\lawtond\Rasters\Woody" for dirpath, dirnames, filenames in walk: for file in filenames: if "woody13" in file.lower(): list_raster.append(os.path.join(dirpath,file)) # FULL path to each raster print (list_raster) arcpy.MosaicToNewRaster_management (list_raster, output_location, "merged_woody_2013.tif","1", "FIRST")
However I get the following error:
Message File Name Line Position Traceback <module> <module3> 18 MosaicToNewRaster C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py 13191 ExecuteError: ERROR 000622: Failed to execute (Mosaic To New Raster). Parameters are not valid. ERROR 000628: Cannot set input into parameter coordinate_system_for_the_raster.
What am I doing wrong here?