## NAME

r.out.ascii - Converts a raster map layer into an ASCII text file.
(GRASS Raster Data Export Program)

## SYNOPSIS

r.out.ascii
r.out.ascii help
r.out.ascii [-hsMi] input=name output=name [dp=value] [null=string]

## DESCRIPTION

r.out.ascii converts a user-specified raster map layer (input=name) into an ASCII text file (output=name) suitable for export to other computer systems.

The GRASS program r.in.ascii can be used to perform the reverse function, converting an ASCII file in suitable format to GRASS raster file format.

## OPTIONS

### Flags:

-h
  Suppress printing of header information.
-s
  Write SURFER .grd ASCII GRID instead of GRASS ASCII GRID
  (with reverted row order, different header)
-M
  Write MODFLOW (USGS) free-format array instead of GRASS ASCII GRID
-i
  Output integer category values, not cell values.

### Parameters:

input=name
  Name of an existing raster map layer.
output
  Name of an output ASCII file (use output=- for stdout)
dp=value
  Number of decimal places.
null=string
  Character string to represent no data cell.

r.out.ascii can be run either non-interactively or interactively. The program will be run non-interactively if the user specifies the name of a raster map layer and (optionally) a value for dp, using the form

  r.out.ascii input=inname output=outname [dp=value]

where inname is the name of a raster map layer to be converted to ASCII format, outname is the name of the exported file, and value is the number of digits (per cell) to be printed to output. The user can also the -h option to suppress the output of file header information.

To write a SURFER .grd ASCII GRID file (with reverted row order and different header) use the -s flag:

  r.out.ascii -s input=inname output=outname.grd [dp=value]

NULL data are coded to "1.70141e+038" for SURFER ASCII GRID files (ignoring the null= parameter).

Alternately, the user can simply type r.out.ascii on the command line, without program arguments. In this case, the user will be prompted for parameter values using the standard GRASS parser interface.

## NOTES

The output from r.out.ascii may be placed into a file by using the UNIX redirection mechanism; e.g.:

  r.out.ascii input=soils output=- > out.file

The output file out.file can then be printed or copied onto a CDROM or floppy disk for export purposes.

## SEE ALSO

r.in.ascii, r.in.arc, parser

## AUTHOR

Michael Shapiro, U.S. Army Construction Engineering Research Laboratory

Surfer support by Markus Neteler

Last changed: $Date: 2003/02/05 11:06:51 $