Raster To Other Format (Conversion)

License Level:BasicStandardAdvanced

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

Syntax

RasterToOtherFormat_conversion (Input_Rasters, Output_Workspace, {Raster_Format})
ParameterExplanationData 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.

  • BILEsri Band Interleaved by Line file.
  • BIPEsri Band Interleaved by Pixel file.
  • BMPBitmap graphic raster dataset format.
  • BSQEsri Band Sequential file.
  • DATENVI DAT file.
  • GIFGraphic Interchange Format for raster datasets.
  • GRIDEsri Grid raster dataset format.
  • IMAGINE ImageERDAS IMAGINE raster data format.
  • JP2000JPEG 2000 raster dataset format.
  • JPEGJoint Photographic Experts Group raster dataset format.
  • PNGPortable Network Graphic raster dataset format.
  • TIFFTag Image File Format for raster datasets.
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

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
10/24/2012