Export ArcGIS ASCII grid

This tool can be used to export a Whitebox GAT raster file to an ArcGIS ASCII grid file. ASCII files are text and as such are capable of being opened and viewed using any text editor. The user must specify the name of one or more Whitebox GAT raster files to be exported. The tool will create ArcGIS ASCII files, with either .txt or .asc extensions, for each input file. Output file names are the same of the input files.

The format of the ArcGIS ASCII grid format is as follows:

NCOLS ###
NROWS ###
XLLCORNER ###
YLLCORNER ###
CELLSIZE ###
NODATA_VALUE ###
####.### ####.### ####.###...
####.### ####.### ####.###...

Where # represents a numeric value and the grid data is stored in space-delimited rows starting on row seven.

ASCII files can be very large when there are a large number of rows and columns in the grid and are also much slower to read/write compared to binary files. As such, the ArcGIS floating-point binary grid format is a better way to transfer GAT raster files into and out of ArcGIS.

Use the ASCII to Raster tool in the Conversion Tools toolbox of ArcGIS to ingest the ASCII grid files into ArcGIS.

See Also:

Scripting:

The following is an example of a Python script using this tool:

wd = pluginHost.getWorkingDirectory()
# You may have multiple input files but they must
# be separated by semicolons in the string.
inputFiles = wd + "input1.dep" + ";" + wd + "input2.dep" + ";" + wd + "input3.dep"
args = [inputFiles]
pluginHost.runPlugin("ExportArcAsciiGrid", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
// You may have multiple input files but they must
// be separated by semicolons in the string.
def inputFiles = wd + "input1.dep" + ";" + wd + "input2.dep" + ";" + wd + "input3.dep"
String[] args = [inputFiles]
pluginHost.runPlugin("ExportArcAsciiGrid", args, false)

Credits: