1r3.out.ascii(1)             GRASS GIS User's Manual            r3.out.ascii(1)
2
3
4

NAME

6       r3.out.ascii  - Converts a 3D raster map layer into a ASCII text file.
7

KEYWORDS

9       raster3d, export, output, voxel, conversion, ASCII
10

SYNOPSIS

12       r3.out.ascii
13       r3.out.ascii --help
14       r3.out.ascii [-hrdcm] input=string  [output=name]   [precision=integer]
15       [null_value=string]   [--overwrite]  [--help]   [--verbose]   [--quiet]
16       [--ui]
17
18   Flags:
19       -h
20           Suppress printing of header information
21
22       -r
23           Switch the row order in output from north->south to south->north
24
25       -d
26           Switch the depth order in output from bottom->top to top->bottom
27
28       -c
29           Print grass6 compatible format. Flags -d and -r are ignored.
30
31       -m
32           Use 3D raster mask (if exists) with input map
33
34       --overwrite
35           Allow output files to overwrite existing files
36
37       --help
38           Print usage summary
39
40       --verbose
41           Verbose module output
42
43       --quiet
44           Quiet module output
45
46       --ui
47           Force launching GUI dialog
48
49   Parameters:
50       input=string [required]
51           3D raster map to be converted to ASCII
52
53       output=name
54           Name for ASCII output file
55
56       precision=integer
57           Number of decimal places for floats
58           Options: 0-20
59           Default: 8
60
61       null_value=string
62           String representing NULL value
63           Default: *
64

DESCRIPTION

66       r3.out.ascii exports a 3D raster map in ASCII format. The input parame‐
67       ter is a valid 3D raster map in the current  mapset  search  path.  The
68       output  parameter is the name of an ASCII file which will be written in
69       the current working directory.
70
71       If output is not specified then standard output (stdout) is used.   The
72       -h  flag may be used to suppress header information. The module is sen‐
73       sitive to region settings (set with g.region).
74
75       The -c flag will create GRASS 6 r3.in.ascii compatible output.
76

NOTES

78       The default format of the exported ASCII file is equivalent to that re‐
79       quired by r3.in.ascii. In particular, files output by r3.out.ascii with
80       header information may  be  converted  back  to  3D  raster  maps  with
81       r3.in.ascii.
82
83       The format of the ASCII file is:
84       version: "grass7"
85       order:   "nsbt" or "nstb" or "snbt" or "sntb"
86       north:   floating point
87       south:   floating point
88       east:    floating point
89       west:    floating point
90       top:     floating point
91       bottom:  floating point
92       rows:    integer
93       cols:    integer
94       levels:  integer
95       The  version  and order options have been introduced in GRASS 7 in June
96       2011.  The order option describes the order of rows and depths  in  the
97       output.   It  is possible to create output of different row order using
98       the -r flag and output of different depths order using  the   -d  flag.
99       The default order is:
100
101       west -> east for columns
102       north -> south for rows
103       bottom -> top for depths
104
105       This header is followed by the cell values in floating point format or‐
106       ganized in rows with constant col and level coordinate.  The  rows  are
107       organized by constant level coordinate. Individual cell values are sep‐
108       arated by space or CR.  Cell values are exported as a series  of  hori‐
109       zontal  slices  in row-major order. The data starts with the upper left
110       corner (NW) at the bottom of the data set.  The values at the following
111       coordinates are exported:
112       (x, y + rows,     z) (x + 1, y + rows,     z) ... (x + cols, y + rows,     z)
113       (x, y + rows,     z) (x + 1, y + rows - 1, z) ... (x + cols, y + rows - 1, z)
114                 .                     .                                .
115                 .                     .                                .
116                 .                     .                                .
117       (x, y,   z + depths) (x + 1, y,   z + depths) ... (x + cols, y,   z + depths)
118       This order is compatible with the r.in.ascii row -> column ordering.
119
120       Supported orders are:
121
122nsbt:  north  ->  south and bottom -> top ordering which is the
123               default (no flags)
124
125snbt: south -> north and bottom -> top ordering using -r flag
126
127nstb: north -> south and top -> bottom ordering using -d flag
128
129sntb: south -> north and top -> bottom ordering using -rd flag
130
131       The internal storage scheme of 3D raster maps is visualized in the fol‐
132       lowing picture:
133
134
135       The  coordinate  system  and  tile  layout of a voxel map in
136       GRASS
137
138
139       One level maps can be imported with r.in.ascii (2D  raster)  using  the
140       default  nsbt  order  and removing the header lines "version", "order",
141       "top", "bottom" and "levels".
142

EXAMPLES

144       We define a small region with 4 columns, 3 rows and  2  depths  (4x3x2)
145       and export it using different ordering definitions:
146       g.region res3=1 t=2 b=0 w=0 e=4 s=0 n=3
147       r3.mapcalc "simple_example = row() + col() + depth()"
148       Default order:
149       r3.out.ascii input=simple_example dp=0
150       version: grass7
151       order: nsbt
152       north: 3.000000
153       south: 0.000000
154       east: 4.000000
155       west: 0.000000
156       top: 2.000000
157       bottom: 0.000000
158       rows: 3
159       cols: 4
160       levels: 2
161       3 4 5 6
162       4 5 6 7
163       5 6 7 8
164       4 5 6 7
165       5 6 7 8
166       6 7 8 9
167       Inverse row order (-r)
168       r3.out.ascii input=simple_example dp=0 -r
169       version: grass7
170       order: snbt
171       north: 3.000000
172       south: 0.000000
173       east: 4.000000
174       west: 0.000000
175       top: 2.000000
176       bottom: 0.000000
177       rows: 3
178       cols: 4
179       levels: 2
180       5 6 7 8
181       4 5 6 7
182       3 4 5 6
183       6 7 8 9
184       5 6 7 8
185       4 5 6 7
186       Inverse depth order (-d)
187       r3.out.ascii input=simple_example dp=0 -d
188       version: grass7
189       order: nstb
190       north: 3.000000
191       south: 0.000000
192       east: 4.000000
193       west: 0.000000
194       top: 2.000000
195       bottom: 0.000000
196       rows: 3
197       cols: 4
198       levels: 2
199       4 5 6 7
200       5 6 7 8
201       6 7 8 9
202       3 4 5 6
203       4 5 6 7
204       5 6 7 8
205       Inverse row and depth order (-rd)
206       r3.out.ascii input=simple_example dp=0 -rd
207       version: grass7
208       order: sntb
209       north: 3.000000
210       south: 0.000000
211       east: 4.000000
212       west: 0.000000
213       top: 2.000000
214       bottom: 0.000000
215       rows: 3
216       cols: 4
217       levels: 2
218       6 7 8 9
219       5 6 7 8
220       4 5 6 7
221       5 6 7 8
222       4 5 6 7
223       3 4 5 6
224

SEE ALSO

226        r3.in.ascii, r.out.ascii, g.region
227

AUTHORS

229       Roman  Waupotitsch, Michael Shapiro, Helena Mitasova, Bill Brown, Lubos
230       Mitas, Jaro Hofierka, Sören Gebbert
231

SOURCE CODE

233       Available at: r3.out.ascii source code (history)
234
235       Accessed: Saturday Jan 21 20:39:36 2023
236
237       Main index | 3D raster index | Topics index | Keywords index |  Graphi‐
238       cal index | Full index
239
240       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
241
242
243
244GRASS 8.2.1                                                    r3.out.ascii(1)
Impressum