Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.
If output is not specified then standard output (stdout) is used. The -h flag may be used to suppress header information. The module is sensitive to region settings (set with g.region).
The -c flag will create GRASS 6 r3.in.ascii compatible output.
The format of the ASCII file is:
version: "grass7" order: "nsbt" or "nstb" or "snbt" or "sntb" north: floating point south: floating point east: floating point west: floating point top: floating point bottom: floating point rows: integer cols: integer levels: integer
west -> east for columns north -> south for rows bottom -> top for depths
This header is followed by the cell values in floating point format organized in rows with constant col and level coordinate. The rows are organized by constant level coordinate. Individual cell values are separated by space or CR. Cell values are exported as a series of horizontal slices in row-major order. The data starts with the upper left corner (NW) at the bottom of the data set. The values at the following coordinates are exported:
(x, y + rows, z) (x + 1, y + rows, z) ... (x + cols, y + rows, z) (x, y + rows, z) (x + 1, y + rows - 1, z) ... (x + cols, y + rows - 1, z) . . . . . . . . . (x, y, z + depths) (x + 1, y, z + depths) ... (x + cols, y, z + depths)
Supported orders are:
The internal storage scheme of 3D raster maps is visualized in the following picture:
One level maps can be imported with r.in.ascii (2D raster) using the default nsbt order and removing the header lines "version", "order", "top", "bottom" and "levels".
g.region res3=1 t=2 b=0 w=0 e=4 s=0 n=3 r3.mapcalc "simple_example = row() + col() + depth()"
r3.out.ascii input=simple_example dp=0 version: grass7 order: nsbt north: 3.000000 south: 0.000000 east: 4.000000 west: 0.000000 top: 2.000000 bottom: 0.000000 rows: 3 cols: 4 levels: 2 3 4 5 6 4 5 6 7 5 6 7 8 4 5 6 7 5 6 7 8 6 7 8 9
r3.out.ascii input=simple_example dp=0 -r version: grass7 order: snbt north: 3.000000 south: 0.000000 east: 4.000000 west: 0.000000 top: 2.000000 bottom: 0.000000 rows: 3 cols: 4 levels: 2 5 6 7 8 4 5 6 7 3 4 5 6 6 7 8 9 5 6 7 8 4 5 6 7
r3.out.ascii input=simple_example dp=0 -d version: grass7 order: nstb north: 3.000000 south: 0.000000 east: 4.000000 west: 0.000000 top: 2.000000 bottom: 0.000000 rows: 3 cols: 4 levels: 2 4 5 6 7 5 6 7 8 6 7 8 9 3 4 5 6 4 5 6 7 5 6 7 8
r3.out.ascii input=simple_example dp=0 -rd version: grass7 order: sntb north: 3.000000 south: 0.000000 east: 4.000000 west: 0.000000 top: 2.000000 bottom: 0.000000 rows: 3 cols: 4 levels: 2 6 7 8 9 5 6 7 8 4 5 6 7 5 6 7 8 4 5 6 7 3 4 5 6
Available at: r3.out.ascii source code (history)
Latest change: Thursday Feb 03 11:10:06 2022 in commit: 547ff44e6aecfb4c9cbf6a4717fc14e521bec0be
Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.
Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual