r.out.ascii(1grass)

r.out.ascii1grass

Converts a raster map layer into a grass ascii text file.

Usage

r.out.ascii

r.out.ascii --help

r.out.ascii [-hsmi] input=name [output=name] [precision=integer] [width=integer] [null_value=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Keywords

raster, export, output, ASCII

Overview

r.out.ascii converts a user-specified raster map layer (input=name) into an ASCII grid in a 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 map format.

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).

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.

To export the raster values as x,y,z values of cell centers (one per line) use the r.out.xyz module.

Source code

Available at: r.out.ascii source code (history)

Accessed: Monday Feb 24 17:50:42 2025

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

Releases

10 releases since Debian 4.0 (Etch); the text changed 9 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12
  10. 13

Authors

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

Surfer support by Markus Neteler

From grass-doc 8.4.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.