| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>r3.in.ascii</em> allows a user to create a (binary) GRASS 3D raster map |
| 4 |
layer from a 3D ASCII raster input file. |
| 5 |
|
| 6 |
<p>The <em>tiledimension</em> parameter defines the dimension of the tiles |
| 7 |
used in the output file. The format is: XxYxZ |
| 8 |
|
| 9 |
<p>The <em>nv</em> parameter specifies which value to convert to NULL-value. |
| 10 |
If the specified value is <em>none</em>, no conversion is performed. |
| 11 |
Default is <em>none</em>. |
| 12 |
|
| 13 |
<h2>NOTES</h2> |
| 14 |
|
| 15 |
The data is automatically imported into the correct internal coordinate system, |
| 16 |
that is visualized in the following picture, independently from the specified |
| 17 |
ordering in the ASCII input file: |
| 18 |
<center> |
| 19 |
<img src="raster3d_layout.png" border="0"><br> |
| 20 |
<table border="0" width="700"> |
| 21 |
<tr><td><center> |
| 22 |
<i>The volume coordinate system and tile layout of the imported voxel map</i> |
| 23 |
</center></td></tr> |
| 24 |
</table> |
| 25 |
</center> |
| 26 |
|
| 27 |
<h3>Format</h3> |
| 28 |
|
| 29 |
The format of the 3D ASCII file: |
| 30 |
<div class="code"><pre> |
| 31 |
version: <i>"grass7"</i> |
| 32 |
order: <i>"nsbt" or "nstb" or "snbt" or "sntb"</i> |
| 33 |
north: <i>floating point</i> |
| 34 |
south: <i>floating point</i> |
| 35 |
east: <i>floating point</i> |
| 36 |
west: <i>floating point</i> |
| 37 |
top: <i>floating point</i> |
| 38 |
bottom: <i>floating point</i> |
| 39 |
rows: <i>integer</i> |
| 40 |
cols: <i>integer</i> |
| 41 |
levels: <i>integer</i> |
| 42 |
</pre></div> |
| 43 |
|
| 44 |
The version and order option have been introduced in GRASS 7 in June 2011. |
| 45 |
The version option is self explaining. The order option specifies the row |
| 46 |
and depth order of the data in the input file. |
| 47 |
The supported row/depth ordering is documented in the <em>r3.out.ascii</em> |
| 48 |
manual page. The order of the data in the input file does not specify the |
| 49 |
data order in the generated output 3D raster map which is in any case |
| 50 |
<em>north -> south, west -> east, bottom -> top</em> order. |
| 51 |
So dependent on the order information the data is automatically imported |
| 52 |
into the correct internal coordinate system. |
| 53 |
<p>The version and order options are not mandatory. In case no version and |
| 54 |
order option is specified, the default GRASS 6 ASCII format is assumed. |
| 55 |
<p>This header is followed by the cell values in <em>floating point</em> format |
| 56 |
organized in rows with constant <em>col</em> and <em>level</em> coordinate. |
| 57 |
The rows are organized by constant <em>level</em> coordinate. Individual cell |
| 58 |
values are separated by <em>space</em> or <em>CR</em>. |
| 59 |
|
| 60 |
<h2>EXAMPLES</h2> |
| 61 |
|
| 62 |
4x3x2 sample. Note in case no specific ordering is specified in the input |
| 63 |
file the upper-left (NW) corner of the bottom level comes first. The according |
| 64 |
order option is: nsbt for north -> south, bottom -> top ordering. This is |
| 65 |
identical with <em>r.in.ascii</em> for single level data. So the y coordinate |
| 66 |
is 0 at the northern edge. |
| 67 |
|
| 68 |
<!-- TODO: beautify HTML --> |
| 69 |
north: 3.0<br> |
| 70 |
south: 0.0<br> |
| 71 |
east: 4.0<br> |
| 72 |
west: 0.0<br> |
| 73 |
top: 2.0<br> |
| 74 |
bottom: 0.0<br> |
| 75 |
rows: 3<br> |
| 76 |
cols: 4<br> |
| 77 |
levels: 2<br> |
| 78 |
w<sub>111</sub>x1,y1,z1 w<sub>211</sub>x2,y1,z1 w<sub>311</sub>x3,y1,z1 w<sub>411</sub>x4,y1,z1<br> |
| 79 |
w<sub>121</sub>x1,y2,z1 w<sub>221</sub>x2,y2,z1 w<sub>321</sub>x3,y2,z1 w<sub>421</sub>x4,y2,z1<br> |
| 80 |
w<sub>131</sub>x1,y3,z1 w<sub>231</sub>x2,y3,z1 w<sub>331</sub>x3,y3,z1 w<sub>431</sub>x4,y3,z1<br> |
| 81 |
w<sub>112</sub>x1,y1,z2 w<sub>212</sub>x2,y1,z2 w<sub>312</sub>x3,y1,z2 w<sub>412</sub>x4,y1,z2<br> |
| 82 |
w<sub>122</sub>x1,y2,z2 w<sub>222</sub>x2,y2,z2 w<sub>322</sub>x3,y2,z2 w<sub>422</sub>x4,y2,z2<br> |
| 83 |
w<sub>132</sub>x1,y3,z2 w<sub>232</sub>x2,y3,z2 w<sub>332</sub>x3,y3,z2 w<sub>432</sub>x4,y3,z2<br> |
| 84 |
<p> |
| 85 |
|
| 86 |
Note that unit tests for <em>r3.in.ascii</em> are implemented in the |
| 87 |
<em>test.r3.out.ascii.sh</em> script located in the |
| 88 |
<em>r3.out.ascii</em> directory. |
| 89 |
|
| 90 |
<h2>EXAMPLES</h2> |
| 91 |
|
| 92 |
Please refer to the detailed examples in |
| 93 |
<a href="r3.out.ascii.html">r3.out.ascii</a>. |
| 94 |
|
| 95 |
<h2>SEE ALSO</h2> |
| 96 |
|
| 97 |
<em> |
| 98 |
<a href="r.in.ascii.html">r.in.ascii</a>, |
| 99 |
<a href="r3.out.ascii.html">r3.out.ascii</a>, |
| 100 |
<a href="v.to.rast3.html">v.to.rast3</a>, |
| 101 |
<a href="g.region.html">g.region</a> |
| 102 |
</em> |
| 103 |
|
| 104 |
<h2>AUTHORS</h2> |
| 105 |
|
| 106 |
Roman Waupotitsch, Michael Shapiro, |
| 107 |
Helena Mitasova, Bill Brown, Lubos Mitas, Jaro Hofierka, Sören Gebbert |