Raster To Other Format (Conversion)
Summary
Converts one or more raster dataset formats supported by ArcGIS to a BIL, BIP, BMP, BSQ, ENVI DAT, GIF, GRID, ERDAS IMAGINE, JPEG, JPEG 2000, PNG TIFF, or to a geodatabase raster dataset format.
Usage
-
You can save your output to BIL, BIP, BMP, BSQ, DAT, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, TIFF, or any geodatabase raster dataset.
Syntax
RasterToOtherFormat_conversion (Input_Rasters, Output_Workspace, {Raster_Format})
Parameter | Explanation | Data Type |
Input_Rasters [Input_Rasters,...] |
The input raster datasets that you wish to convert. | Raster Dataset |
Output_Workspace |
The location where converted raster datasets will be stored. | Workspace ;Raster Catalog |
Raster_Format (Optional) |
The format of the output raster dataset.
| String |
Code Sample
RasterToOtherFormats example 1 (Python window)
This sample converts several input rasters of different formats and outputs them as rasters all of the same format.
import arcpy from arcpy import env env.workspace = "c:/data/PrjWorkspace/RasGP" arcpy.RasterToOtherFormat_conversion("test.tif;test2.tif;test3.tif",\ "OtherFormat","BIL")
RasterToOtherFormats example 2 (stand-alone script)
This sample converts several input rasters of different formats and outputs them as rasters all of the same format..
##========================= ##Raster To Other Format ##Usage: RasterToOtherFormat_conversion Input_Rasters;Input_Rasters... Output_Workspace {TIFF | BIL | BIP ## | BMP | BSQ | ENVI DAT | GIF | GRID | IMAGINE Image | JP2000 | JPEG | PNG} try: import arcpy arcpy.env.workspace = r"\\MyMachine\PrjWorkspace\RasGP" ##Convert Multiple Raster Dataset to FGDB arcpy.RasterToOtherFormat_conversion("test1;test2.tif;test3.img","OtherFormat.gdb","") ##Load Raster Catalog arcpy.RasterToOtherFormat_conversion("test.tif;test2.tif;test3.tif","OtherFormat","BIL") except: print "Raster To Other Format exsample failed." print arcpy.GetMessages()
Environments
Related Topics
Licensing Information
ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes
11/14/2011