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