r3.in.ascii.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <H2>DESCRIPTION</H2>
  2. Convert a 3D ASCII raster text file into a (binary) 3D raster map layer.
  3. <H3>Parameters:</H3>
  4. <DL>
  5. <DT><B>type</B>
  6. <DD>Data type used in the output file
  7. <DD>Options: default, double, float
  8. <DT><B>precision</B>
  9. <DD>Precision used in the output file
  10. <DD>Options: default, max, 0-52
  11. <DT><B>compression</B>
  12. <DD>Note that the <EM>none</EM> option only specifies
  13. that neither LZW nor RLE is used for compression. It
  14. does not turn off the compression all together. G3D does
  15. not support non-compressed files.
  16. <DD>Options: default, rle, none
  17. <DT><B>tiledimension</B>
  18. <DD>The dimension of the tiles used in the output file. The format is: XxYxZ
  19. <DT><B>nv</B>
  20. <DD>Specifies which value to convert to NULL-value. If the specified value is
  21. <em>none</em>, no conversion is performed. Default is <em>*</em>.
  22. <DT><B>input</B>
  23. <DD>Path and name of ASCII file to be imported
  24. <DT><B>output</B>
  25. <DD>Name of the G3D output map
  26. </DL>
  27. <H2>NOTES</H2>
  28. The format for the ascii file is:
  29. <pre>
  30. version: <i>"grass7"</i>
  31. order: <i>"nsbt" or "nstb" or "snbt" or "sntb"</i>
  32. north: <i>floating point</i>
  33. south: <i>floating point</i>
  34. east: <i>floating point</i>
  35. west: <i>floating point</i>
  36. top: <i>floating point</i>
  37. bottom: <i>floating point</i>
  38. rows: <i>integer</i>
  39. cols: <i>integer</i>
  40. levels: <i>integer</i>
  41. </pre>
  42. The version and order option are introduced in grass7 June 2011. The version option
  43. is self explaining. The order option specifies the row and depth order of the data in the input file.
  44. The supported row/depth ordering is documented in the <A HREF="r3.out.ascii.html">r3.out.ascii</A>
  45. manpage. The order of the data in the input file does not specifiy the data order in the
  46. generated output raster3d map which is in any case <em>north -> south, west -> east, bottom -> top</em> ordering.
  47. So dependent on the order information the data is automatically imported into the correct internal coordinate system.
  48. <P>
  49. The version and order options are not mandatory. In case no version and order option is specified,
  50. the default grass6 ascii format is assumed.
  51. <P>
  52. This header is followed by the cell values in <EM>floating point</EM> format
  53. organized in rows with constant <EM>col</EM> and <EM>level</EM> coordinate.
  54. The rows are organized by constant <EM>level</EM> coordinate. Individual cell
  55. values are separated by <EM>space</EM> or <EM>CR</EM>.
  56. <P>
  57. <H2>EXAMPLES</H2>
  58. 4x3x2 sample. Note in case no specific ordering is specified in the input file the
  59. upper-left (NW) corner of the bottom level comes first. The according order option is: nsbt for
  60. north -> south, bottom -> top ordering. This is identical with <em>r.in.ascii</em>
  61. for single level data. So the y coordinate is 0 at the northern edge.
  62. <div class="code"><pre>
  63. north: 3.0
  64. south: 0.0
  65. east: 4.0
  66. west: 0.0
  67. top: 2.0
  68. bottom: 0.0
  69. rows: 3
  70. cols: 4
  71. levels: 2
  72. x1,y1,z1 x2,y1,z1 x3,y1,z1 x4,y1,z1
  73. x1,y2,z1 x2,y2,z1 x3,y2,z1 x4,y2,z1
  74. x1,y3,z1 x2,y3,z1 x3,y3,z1 x4,y3,z1
  75. x1,y1,z2 x2,y1,z2 x3,y1,z2 x4,y1,z2
  76. x1,y2,z2 x2,y2,z2 x3,y2,z2 x4,y2,z2
  77. x1,y3,z2 x2,y3,z2 x3,y3,z2 x4,y3,z2
  78. </pre></div>
  79. Note that unit tests for r3.in.ascii are implemented in the <em>test.r3.out.ascii.sh</em> script located in
  80. the r3.out.ascii directory.
  81. <H2>AUTHORS</H2>
  82. Roman Waupotitsch, Michael Shapiro,
  83. Helena Mitasova, Bill Brown, Lubos Mitas, Jaro Hofierka, Soeren Gebbert
  84. <H2>SEE ALSO</H2>
  85. <EM>
  86. <A HREF="r.in.ascii.html">r.in.ascii</A>,
  87. <A HREF="r3.out.ascii.html">r3.out.ascii</A>,
  88. <A HREF="v.to.rast3.html">v.to.rast3</A>
  89. </EM>
  90. <p>
  91. <i>Last changed: $Date$</i>