This tool can be used to export a Whitebox GAT raster file to a Surfer (Golden Software) 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 Surfer ASCII files, with .grd extensions, for each input file. Output file names are the same of the input files.
The format of the Surfer ASCII grid format is as follows:
DSAA
NumberOfColumns NumberOfRows
MinXCoordinate MaxXCoordinate
MinYCoordinate MaxYCoordinate
MinZValue MaxZValue
####.### ####.### ####.###...
####.### ####.### ####.###...
An Example is given below:
DSAA
201 380
416798.95 417000
4679619.71 4680000
174.66 174.54 174.39 ...
175.44 174.32 173.99 ...
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. Notice as well that all Whitebox GAT NoData values (-32,768) will be converted to the Surfer NoData value of 1.70141E+38 in the output grid.
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("ExportSurferAsciiGrid", 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("ExportSurferAsciiGrid", args, false)