Is it possible to access the "Export Raster Data" tool in arcpy?
Some background on the steps I am trying to process: I have a raster loaded into an mxd. I have converted the raster to a temporary layer ("make raster layer" tool) file so that tabular data (in the form of a .csv file) can be joined (via Add Join tool) based on a common field. I then export the raster layer with the joined tabular data to a new raster. My issue is with the last step: export to new raster.
The "Export Raster Data" tool that is accessed by right clicking on the raster layer to bring up the Data/Export Data menus produces a new raster in about 30mins. The file is exported to a file geodatabase with the same spatial reference and non compression type.
The "Copy Raster" tool provides the same output as "Export Raster Data" tool but takes 14hours to run on the same dataset. The file is exported to a file geodatabase and optional values are left blank.
I have hundreds of rasters that I need to export so I have been building a python script to do the process for me (convert to raster layer, join tabular data, and export to new raster). But since the "Copy Raster" tool is taking too long to run, I want to find a way to use the "Export Raster Data" tool in the script.
I have also tried the "Copy" tool and the "Raster to Other Format Conversion" tool but they do not handle raster layer files.
I am running ArcGIS 10.2 Basic with Spatial Analyst Extension. Below are the python snippets extracted from ArcMap once the tools were run in the mxd. The last tool (copy raster) took 14hrs to run in arcmap so I'm looking for an alternative (such as the export raster data tool).
print " make raster layer" arcpy.MakeRasterLayer_management("D:/Alces_Projects/AO_Alberta_NEW/Data/Indicators/Climate/ClimateChange_Processing_CAAB_20160411.gdb/blank_canvas_Tier3Tile5_v1f_20160411","blank_canvas_Tier3Tile5_v1f_20160411_layer","#","D:/Alces_Projects/AO_Alberta_NEW/Data/Indicators/Climate/ClimateChange_Processing_CAAB_20160411.gdb/blank_canvas_Tier3Tile5_v1f_20160411","#") print " add join to csv data" arcpy.AddJoin_management("blank_canvas_Tier3Tile5_v1f_20160411_layer","Value","D:/Alces_Projects/AO_Alberta_NEW/Data/Indicators/Climate/ClimateChange_Software_Output_Files/DecadeScenarios/Tier3Tile5_Decade_1921_1930.csv","ID1","KEEP_ALL") print " copy joined raster to new raster" arcpy.CopyRaster_management("blank_canvas_Tier3Tile5_v1f_20160411_layer","Tier3Tile5_Decade_1921_1930","#","#","2147483647","NONE","NONE","#","NONE","NONE")
I thought I would edit this post to include the solution that I found to the problem. Turns out the issue was with the join to the csv file. I converted the csv to DBASE file and the copy raster process ran in minutes instead of hours.