Wednesday, 31 January 2018

arcgis 10.1 - Export Raster Data to TIFF, BMP, or PNG File using ArcPy?


I am writing a Python script to export a Raster Dataset to a TIFF, BMP, or PNG file, as I would manually by right-clicking on the layer, choosing Data | Export Data, and then make my choices in the Export Raster Data window. Can this be duplicated with ArcPy, and if so, how?



Answer



Another solution would be to use the Copy Raster tool:


arcpy.CopyRaster_management(in_raster, out_rasterdataset)


Where you add the file extension to out_rasterdataset


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...