Export Raster World File (Data Management)

Summary

Creates a world file based on the geographic information of a raster dataset. The pixel size and the location of the upper left pixel is extracted for the world file.

Usage

Syntax

ExportRasterWorldFile_management (in_raster_dataset)
ParameterExplanationData Type
in_raster_dataset

The raster dataset for which the world file will be created.

Raster Dataset

Code Sample

ExportRasterWorldFile example 1 (Python window)

This is a Python sample for the ExportRasterWorldFile tool.

import arcpy
arcpy.ExportRasterWorldFile_management("c:/data/image.tif")
ExportRasterWorldFile example 2 (stand-alone window)

This is a Python script sample for the ExportRasterWorldFile tool.

##====================================
##Export Raster World File
##Usage: ExportRasterWorldFile_management in_raster
    
try:
    import arcpy
    arcpy.env.workspace = r"C:/Workspace"
    
    ##Export tfw file from the intput Raster Dataset
    arcpy.ExportRasterWorldFile_management("image.tif")

except:
    print "Export Raster World File example failed."
    print arcpy.GetMessages()

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

10/27/2014