import arcpyin_format = arcpy.GetParameterAsText(0)out_format =arcpy.GetParameterAsText(1 )out_folder =arcpy.GetParameterAsText(3 )arcpy.env.workspace =arcpy.GetParameterAsText(2 )rasters =arcpy.ListRasters( " * " ,)arcpy.RasterToOtherForma
import arcpy in_format=arcpy.GetParameterAsText(0) out_format=arcpy.GetParameterAsText(1) out_folder=arcpy.GetParameterAsText(3) arcpy.env.workspace=arcpy.GetParameterAsText(2) rasters=arcpy.ListRasters("*",) arcpy.RasterToOtherFormat_conversion(rasters,out_folder,out_format)
注意栅格名称中不要出现中文字符。
RasterToOtherFormat_conversion帮助页:http://desktop.arcgis.com/zh-cn/arcmap/10.3/tools/conversion-toolbox/raster-to-other-format.htm