| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>r.out.ascii</em> converts a user-specified raster map layer |
| 4 |
(<b>input=</b><em>name</em>) into an ASCII grid in a text file |
| 5 |
(<b>output=</b><em>name</em>) suitable for export to |
| 6 |
other computer systems. |
| 7 |
|
| 8 |
<p> |
| 9 |
The GRASS program <em><a href="r.in.ascii.html">r.in.ascii</a></em> can be |
| 10 |
used to perform the reverse function, converting an ASCII file in suitable |
| 11 |
format to GRASS raster map format. |
| 12 |
<p> |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
<p>To write a SURFER .grd ASCII GRID file (with reverted row order and different |
| 18 |
header) use the <em>-s</em> flag: |
| 19 |
|
| 20 |
<div class="code"><pre> |
| 21 |
r.out.ascii -s input=inname output=outname.grd [dp=value] |
| 22 |
</pre></div> |
| 23 |
|
| 24 |
NULL data are coded to "1.70141e+038" for SURFER ASCII GRID files (ignoring |
| 25 |
the <em>null=</em> parameter). |
| 26 |
|
| 27 |
<p>To write a LISFLOOD .dem ASCII GRID file (with different header) use the |
| 28 |
<em>-l</em> flag: |
| 29 |
|
| 30 |
<div class="code"><pre> |
| 31 |
r.out.ascii -l input=inname output=outname.dem |
| 32 |
</pre></div> |
| 33 |
|
| 34 |
NULL data output are set by the user at "-9999" in this case, see below: |
| 35 |
|
| 36 |
<div class="code"><pre> |
| 37 |
ncols 1514 |
| 38 |
nrows 2747 |
| 39 |
xllcorner 212236 |
| 40 |
yllcorner 2910116 |
| 41 |
cellsize 120 |
| 42 |
NODATA_value -9999 |
| 43 |
</pre></div> |
| 44 |
|
| 45 |
<h2>NOTES</h2> |
| 46 |
|
| 47 |
The output from <em>r.out.ascii</em> may be placed into a file by using the |
| 48 |
UNIX redirection mechanism; e.g.: |
| 49 |
|
| 50 |
<div class="code"><pre> |
| 51 |
r.out.ascii input=soils output=- > out.file |
| 52 |
</pre></div> |
| 53 |
|
| 54 |
The output file out.file can then be printed or copied onto a CDROM |
| 55 |
or floppy disk for export purposes. |
| 56 |
<p>To export the raster values as x,y,z values of cell centers (one per line) |
| 57 |
use the <em><a href="r.out.xyz.html">r.out.xyz</a></em> module. |
| 58 |
|
| 59 |
<h2>SEE ALSO</h2> |
| 60 |
|
| 61 |
<em> |
| 62 |
<a href="r.in.ascii.html">r.in.ascii</a>, |
| 63 |
<a href="r.in.gdal.html">r.in.gdal</a>, |
| 64 |
<a href="r.out.bin.html">r.out.bin</a>, |
| 65 |
<a href="r.out.gdal.html">r.out.gdal</a>, |
| 66 |
<a href="r.out.xyz.html">r.out.xyz</a> |
| 67 |
</em> |
| 68 |
|
| 69 |
<h2>AUTHORS</h2> |
| 70 |
|
| 71 |
Michael Shapiro, |
| 72 |
U.S. Army Construction Engineering Research Laboratory |
| 73 |
<p>Surfer support by Markus Neteler |