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