123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <h2>DESCRIPTION</h2>
- <em>r.in.ascii</em> allows a user to create a (binary) GRASS raster map
- layer from an ASCII raster input file with (optional) TITLE.
- <p>
- The GRASS ASCII <b>input</b> file has a header section which describes
- the location and size of the data, followed by the data itself.
- <p>
- The header has 6 lines:
- <div class="code"><pre>
- north: xxxxxx.xx
- south: xxxxxx.xx
- east: xxxxxx.xx
- west: xxxxxx.xx
- rows: r
- cols: c
- </pre></div>
- The north, south, east, and west field values entered
- are the coordinates of the edges of the geographic region.
- The rows and cols field values entered describe the dimensions
- of the matrix of data to follow.
- The data which follows is <em>r</em> rows of <em>c</em> integers.
- <p>
- Optionally the following parameters can be defined in the header section:
- <div class="code"><pre>
- null: nn
- type: float
- multiplier: 2.
- </pre></div>
- <p>
- "null" defines a string or number to be converted to NULL value (no
- data).<br>
- "type" defines the data type (int, float double) and is not required.<br>
- "multiplier" is an optional parameter to multiply each cell value.
- <h2>NOTES</h2>
- The geographic coordinates north, south, east, and west
- describe the outer edges of the geographic region. They
- run along the edges of the cells at the edge of the
- geographic region and <em>not</em> through the center of the cells
- at the edges.
- The NW value occurs at the beginning of the first line of data, and the
- SW value occurs at the beginning of the last line of data.
- <p>
- The data (which follows the header section) must contain
- <tt>r</tt> <em>x</em> <tt>c</tt> values, but it is not necessary
- that all the data for a row be on one line. A row may be
- split over many lines.
- <p>
- <em>r.in.ascii</em> may import <i>integer</i>, <i>floating point</i>, or <i>double</i> cell
- types using the <b>-i</b>, <b>-f</b>, and <b>-d</b> flags, respectively.
- <p>
- The header information in ESRI Raster ASCII files differs from GRASS.
- To convert an Arc/Info (ArcView) ASCII grid file into GRASS, see
- <em><a href="r.in.gdal.html">r.in.gdal</a></em>.
- <p>
- SURFER (Golden Software) ASCII files may be imported by passing the <b>-s</b> flag.
- <h2>EXAMPLE</h2>
- The following is a sample <b>input</b> file to <em>r.in.ascii</em>:
- <div class="code"><pre>
- north: 4299000.00
- south: 4247000.00
- east: 528000.00
- west: 500000.00
- rows: 10
- cols: 15
- null: -9999
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- </pre></div>
- <h2>SEE ALSO</h2>
- <em>
- <a href="r.import.html">r.import</a>,
- <a href="r.out.ascii.html">r.out.ascii</a>,
- <a href="r.in.gdal.html">r.in.gdal</a>,
- <a href="r.out.gdal.html">r.out.gdal</a>,
- <a href="r.in.bin.html">r.in.bin</a>,
- <a href="r3.in.ascii.html">r3.in.ascii</a>
- </em>
- <h2>AUTHOR</h2>
- Michael Shapiro, U.S. Army Construction Engineering Research Laboratory<br>
- Surfer support by Roger Miller
- <p><i>Last changed: $Date$</i>
|