Debian Codegraph @

raster/r.in.ascii/r.in.ascii.md

raw
1 ## DESCRIPTION
2
3 *r.in.ascii* allows a user to create a (binary) GRASS raster map layer
4 from an ASCII raster input file with (optional) TITLE.
5
6 The GRASS ASCII **input** file has a header section which describes the
7 location and size of the data, followed by the data itself.
8
9 The header has 6 lines:
10
11 ```sh
12 north: xxxxxx.xx
13 south: xxxxxx.xx
14 east: xxxxxx.xx
15 west: xxxxxx.xx
16 rows: r
17 cols: c
18 ```
19
20 The north, south, east, and west field values entered are the
21 coordinates of the edges of the geographic region. The rows and cols
22 field values entered describe the dimensions of the matrix of data to
23 follow. The data which follows is *r* rows of *c* integers.
24
25 Optionally the following parameters can be defined in the header
26 section:
27
28 ```sh
29 null: nn
30 type: float
31 multiplier: 2.
32 ```
33
34 "null" defines a string or number to be converted to NULL value (no
35 data).
36 "type" defines the data type (int, float double) and is not required.
37 "multiplier" is an optional parameter to multiply each cell value.
38
39 ## NOTES
40
41 The geographic coordinates north, south, east, and west describe the
42 outer edges of the geographic region. They run along the edges of the
43 cells at the edge of the geographic region and *not* through the center
44 of the cells at the edges. The NW value occurs at the beginning of the
45 first line of data, and the SW value occurs at the beginning of the last
46 line of data.
47
48 The data (which follows the header section) must contain `r` *x* `c`
49 values, but it is not necessary that all the data for a row be on one
50 line. A row may be split over many lines.
51
52 The imported cell type can be forced using the **type** option, default
53 is auto-detection.
54
55 The header information in ESRI Raster ASCII files differs from GRASS. To
56 convert an Arc/Info (ArcView) ASCII grid file into GRASS, see
57 *[r.in.gdal](r.in.gdal.md)*.
58
59 SURFER (Golden Software) ASCII files may be imported by passing the
60 **-s** flag.
61
62 ## EXAMPLE
63
64 The following is a sample **input** file to *r.in.ascii*:
65
66 ```sh
67 north: 4299000.00
68 south: 4247000.00
69 east: 528000.00
70 west: 500000.00
71 rows: 10
72 cols: 15
73 null: -9999
74
75 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
76 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
77 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
78 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
79 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
80 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
81 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
82 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
83 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
84 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
85 ```
86
87 ## SEE ALSO
88
89 *[r.import](r.import.md), [r.out.ascii](r.out.ascii.md),
90 [r.in.gdal](r.in.gdal.md), [r.out.gdal](r.out.gdal.md),
91 [r.in.bin](r.in.bin.md), [r3.in.ascii](r3.in.ascii.md)*
92
93 ## AUTHORS
94
95 Michael Shapiro, U.S. Army Construction Engineering Research
96 Laboratory
97 Surfer support by Roger Miller