Import GRASS ASCII grid

This tool can be used to import a GRASS ASCII grid file to Whitebox GAT raster file format. 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 GRASS ASCII raster files to be exported. The tool will create Whitebox GAT raster files for each input file. Output file names are the same of the input files. 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.txt" + ";" + wd + "input2.txt" + ";" + wd + "input3.txt"
args = [inputFiles]
pluginHost.runPlugin("ImportGRASSAsciiGrid", 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.txt" + ";" + wd + "input2.txt" + ";" + wd + "input3.txt"
String[] args = [inputFiles]
pluginHost.runPlugin("ImportGRASSAsciiGrid", args, false)

Credits: