1r.in.ascii(1) Grass User's Manual r.in.ascii(1)
2
3
4
6 r.in.ascii - Converts ASCII raster file to binary raster map layer.
7
9 raster, import, conversion
10
12 r.in.ascii
13 r.in.ascii help
14 r.in.ascii [-ifds] [input=name] output=name [title="phrase"]
15 [mult=float] [nv=string] [--overwrite] [--verbose] [--quiet]
16
17 Flags:
18 -i
19 Integer values are imported
20
21 -f
22 Floating point values are imported
23
24 -d
25 Double floating point values are imported
26
27 -s
28 SURFER (Golden Software) ASCII file will be imported
29
30 --overwrite
31 Allow output files to overwrite existing files
32
33 --verbose
34 Verbose module output
35
36 --quiet
37 Quiet module output
38
39 Parameters:
40 input=name
41 ASCII raster file to be imported. If not given reads from standard
42 input
43
44 output=name
45 Name for output raster map
46
47 title=
48 Title for resultant raster map
49
50 mult=float
51 Multiplier for ASCII data
52 Default: 1.0 or read from header
53
54 nv=string
55 String representing NULL value data cell
56 Default: * or read from header
57
59 r.in.ascii allows a user to create a (binary) GRASS raster map layer
60 from an ASCII raster input file with (optional) TITLE.
61
62 The GRASS ASCII input file has a header section which describes the
63 location and size of the data, followed by the data itself.
64
65 The header has 6 lines:
66 north: xxxxxx.xx
67 south: xxxxxx.xx
68 east: xxxxxx.xx
69 west: xxxxxx.xx
70 rows: r
71 cols: c
72 The north, south, east, and west field values entered are the coordi‐
73 nates of the edges of the geographic region. The rows and cols field
74 values entered describe the dimensions of the matrix of data to follow.
75 The data which follows is r rows of c integers.
76
77 Optionally the following parameters can be defined in the header sec‐
78 tion:
79 null: nn
80 type: float
81 multiplier: 2.
82
83
84 "null" defines a string or number to be converted to NULL value (no
85 data).
86 "type" defines the data type (int, float double) and is not required.
87 "multiplier" is an optional parameter to multiply each cell value.
88
90 The following is a sample input file to r.in.ascii:
91 north: 4299000.00
92 south: 4247000.00
93 east: 528000.00
94 west: 500000.00
95 rows: 10
96 cols: 15
97 null: -9999
98 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
99 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
100 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
101 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
102 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
103 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
104 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
105 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
106 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
107 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
108
109
111 The geographic coordinates north, south, east, and west describe the
112 outer edges of the geographic region. They run along the edges of the
113 cells at the edge of the geographic region and not through the center
114 of the cells at the edges. The NW value occurs at the beginning of the
115 first line of data, and the SW value occurs at the beginning of the
116 last line of data.
117
118 The data (which follows the header section) must contain r x c values,
119 but it is not necessary that all the data for a row be on one line. A
120 row may be split over many lines.
121
122 r.in.ascii handles floating point cell values.
123
124 The header information in ESRI Raster ASCII files differs from GRASS.
125 To convert an Arc/Info (ArcView) ASCII grid file into GRASS, click
126 here. Also, see r.in.arc to import ESRI Raster ASCII files.
127
129 r.out.ascii, r.in.arc, r.in.gdal, r.out.arc, r.in.bin, r3.in.ascii,
130 GRASS ASCII formats
131
133 Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
134 Surfer support by Roger Miller
135
136 Last changed: $Date: 2006-10-16 14:35:49 +0200 (Mon, 16 Oct 2006) $
137
138 Full index
139
140 © 2003-2008 GRASS Development Team
141
142
143
144GRASS 6.3.0 r.in.ascii(1)