3
<em>r.in.ascii</em> allows a user to create a (binary) GRASS raster map
4
layer from an ASCII raster input file with (optional) TITLE.
8
The GRASS ASCII <b>input</b> file has a header section which describes
9
the location and size of the data, followed by the data itself.
13
The header has 6 lines:
15
<div class="code"><pre>
24
The north, south, east, and west field values entered
25
are the coordinates of the edges of the geographic region.
26
The rows and cols field values entered describe the dimensions
27
of the matrix of data to follow.
28
The data which follows is <em>r</em> rows of <em>c</em> integers.
32
Optionally the following parameters can be defined in the header section:
34
<div class="code"><pre>
42
"null" defines a string or number to be converted to NULL value (no
44
"type" defines the data type (int, float double) and is not required.<br>
45
"multiplier" is an optional parameter to multiply each cell value.
49
The geographic coordinates north, south, east, and west
50
describe the outer edges of the geographic region. They
51
run along the edges of the cells at the edge of the
52
geographic region and <em>not</em> through the center of the cells
54
The NW value occurs at the beginning of the first line of data, and the
55
SW value occurs at the beginning of the last line of data.
59
The data (which follows the header section) must contain
60
<tt>r</tt> <em>x</em> <tt>c</tt> values, but it is not necessary
61
that all the data for a row be on one line. A row may be
62
split over many lines.
66
<em>r.in.ascii</em> may import <i>integer</i>, <i>floating point</i>, or <i>double</i> cell
67
types using the <b>-i</b>, <b>-f</b>, and <b>-d</b> flags, respectively.
71
The header information in ESRI Raster ASCII files differs from GRASS.
72
To convert an Arc/Info (ArcView) ASCII grid file into GRASS, see
73
<em><a href="r.in.arc.html">r.in.arc</a></em>.
77
SURFER (Golden Software) ASCII files may be imported by passing the <b>-s</b> flag.
81
The following is a sample <b>input</b> file to <em>r.in.ascii</em>:
83
<div class="code"><pre>
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
97
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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
107
<a href="r.out.ascii.html">r.out.ascii</a>,
108
<a href="r.in.arc.html">r.in.arc</a>,
109
<a href="r.in.gdal.html">r.in.gdal</a>,
110
<a href="r.out.arc.html">r.out.arc</a>,
111
<a href="r.in.bin.html">r.in.bin</a>,
112
<a href="r3.in.ascii.html">r3.in.ascii</a></em>,
113
<a href="http://grass.osgeo.org/gdp/html_grass5/ascii_formats.html">GRASS ASCII formats</a>
118
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory<br>
119
Surfer support by Roger Miller
122
<i>Last changed: $Date: 2009-02-04 02:43:30 +0100 (Wed, 04 Feb 2009) $</i>