Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Conversion toolbox > From Raster toolset > Tools

Raster To ASCII (Conversion)

Release 9.2
Last modified April 2, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Converts a raster dataset to an ASCII file representing raster data.


Usage tips

Command line syntax
An overview of the Command Line window
RasterToASCII_conversion <in_raster> <out_ascii_file>

Parameter Explanation Data Type
<in_raster>

The input raster dataset.

The raster can be integer or floating point.

Composite Geodataset
<out_ascii_file>

The output ASCII file.

File
Data types for geoprocessing tool parameters


Command line example

RasterToASCII_conversion d:\images\Myraster.mdb\Flemming Flemming.txt

Scripting syntax
About getting started with writing geoprocessing scripts
RasterToASCII_conversion (in_raster, out_ascii_file)

Parameter Explanation Data Type
in_raster (Required)

The input raster dataset.

The raster can be integer or floating point.

Composite Geodataset
out_ascii_file (Required)

The output ASCII file.

File

Data types for geoprocessing tool parameters


Script example

# RasterToASCII_sample.py
# Description: 
#   Converts a raster into an ASCII file representing raster data.
# Requirements: None
# Author: ESRI
# Date: Oct 20, 2005
# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

try:
    # Set local variables
    InRaster = "C:/data/raster1"
    OutAsciiFile = "C:/data/raster2ascii.asc"

    # Process: RasterToASCII_conversion
    gp.RasterToASCII_conversion(InRaster, OutAsciiFile)

except:
    # Print error message if an error occurs
    print gp.GetMessages()

Map Algebra syntax
See GridASCII.

The Spatial Analyst extension must be present to use this link.

ArcObjects syntax
See ExportToASCII.

The Spatial Analyst extension must be present to use this link.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.