Export GRASS ASCII grid

This tool can be used to export a Whitebox GAT raster file to a GRASS ASCII grid file. ASCII files are text data and as such can be 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 GRASS ASCII files, with .txt extensions, for each input file. Output file names are the same of the input files.

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

north: ####.###
south: ####.###
east: ####.###
west: ####.###
rows: ####.###
cols: ####.###
####.### ####.### ####.###...
####.### ####.### ####.###...

Where ####.### is a floating point value. 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.

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("ExportGRASSAsciiGrid", 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("ExportGRASSAsciiGrid", args, false)

Credits: