Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2013

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: r.in.ascii</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>r.in.ascii</b></em>  - Converts ASCII raster file to binary raster map layer.
<h2>KEYWORDS</h2>
raster, import, conversion
<h2>SYNOPSIS</h2>
<b>r.in.ascii</b><br>
<b>r.in.ascii help</b><br>
<b>r.in.ascii</b> [-<b>ifds</b>]  [<b>input</b>=<em>name</em>]  <b>output</b>=<em>name</em>  [<b>title</b>=<em>"phrase"</em>]   [<b>mult</b>=<em>float</em>]   [<b>nv</b>=<em>string</em>]   [--<b>overwrite</b>]  [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-i</b></DT>
<DD>Integer values are imported</DD>

<DT><b>-f</b></DT>
<DD>Floating point values are imported</DD>

<DT><b>-d</b></DT>
<DD>Double floating point values are imported</DD>

<DT><b>-s</b></DT>
<DD>SURFER (Golden Software) ASCII file will be imported</DD>

<DT><b>--overwrite</b></DT>
<DD>Allow output files to overwrite existing files</DD>
<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>name</em></DT>
<DD>ASCII raster file to be imported. If not given reads from standard input</DD>

<DT><b>output</b>=<em>name</em></DT>
<DD>Name for output raster map</DD>

<DT><b>title</b>=<em>"phrase"</em></DT>
<DD>Title for resultant raster map</DD>

<DT><b>mult</b>=<em>float</em></DT>
<DD>Multiplier for ASCII data</DD>
<DD>Default: <em>1.0 or read from header</em></DD>

<DT><b>nv</b>=<em>string</em></DT>
<DD>String representing NULL value data cell</DD>
<DD>Default: <em>* or read from header</em></DD>

</DL>
<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>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>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> handles floating point cell values.

<P>
The header information in ESRI Raster ASCII files differs from GRASS.  
To convert an Arc/Info (ArcView) ASCII grid file into GRASS, click 
<A HREF="http://grass.itc.it/faq/arcgrid.header.html">here</A>.  
Also, see <EM><A HREF="r.in.arc.html">r.in.arc</A></EM> to import 
ESRI Raster ASCII files.

<H2>SEE ALSO</H2>

<EM>
<A HREF="r.out.ascii.html">r.out.ascii</A>,
<A HREF="r.in.arc.html">r.in.arc</A>, 
<A HREF="r.in.gdal.html">r.in.gdal</A>, 
<A HREF="r.out.arc.html">r.out.arc</A>,
<A HREF="r.in.bin.html">r.in.bin</A>,
<A HREF="r3.in.ascii.html">r3.in.ascii</A></em>,
<A HREF="http://grass.itc.it/gdp/html_grass5/ascii_formats.html">GRASS ASCII formats</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: 2006-10-16 14:35:49 +0200 (Mon, 16 Oct 2006) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>