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