r.in.ascii.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <h2>DESCRIPTION</h2>
  2. <em>r.in.ascii</em> allows a user to create a (binary) GRASS raster map
  3. layer from an ASCII raster input file with (optional) TITLE.
  4. <p>
  5. The GRASS ASCII <b>input</b> file has a header section which describes
  6. the location and size of the data, followed by the data itself.
  7. <p>
  8. The header has 6 lines:
  9. <div class="code"><pre>
  10. north: xxxxxx.xx
  11. south: xxxxxx.xx
  12. east: xxxxxx.xx
  13. west: xxxxxx.xx
  14. rows: r
  15. cols: c
  16. </pre></div>
  17. The north, south, east, and west field values entered
  18. are the coordinates of the edges of the geographic region.
  19. The rows and cols field values entered describe the dimensions
  20. of the matrix of data to follow.
  21. The data which follows is <em>r</em> rows of <em>c</em> integers.
  22. <p>
  23. Optionally the following parameters can be defined in the header section:
  24. <div class="code"><pre>
  25. null: nn
  26. type: float
  27. multiplier: 2.
  28. </pre></div>
  29. <p>
  30. "null" defines a string or number to be converted to NULL value (no
  31. data).<br>
  32. "type" defines the data type (int, float double) and is not required.<br>
  33. "multiplier" is an optional parameter to multiply each cell value.
  34. <h2>NOTES</h2>
  35. The geographic coordinates north, south, east, and west
  36. describe the outer edges of the geographic region. They
  37. run along the edges of the cells at the edge of the
  38. geographic region and <em>not</em> through the center of the cells
  39. at the edges.
  40. The NW value occurs at the beginning of the first line of data, and the
  41. SW value occurs at the beginning of the last line of data.
  42. <p>
  43. The data (which follows the header section) must contain
  44. <tt>r</tt> <em>x</em> <tt>c</tt> values, but it is not necessary
  45. that all the data for a row be on one line. A row may be
  46. split over many lines.
  47. <p>
  48. <em>r.in.ascii</em> may import <i>integer</i>, <i>floating point</i>, or <i>double</i> cell
  49. types using the <b>-i</b>, <b>-f</b>, and <b>-d</b> flags, respectively.
  50. <p>
  51. The header information in ESRI Raster ASCII files differs from GRASS.
  52. To convert an Arc/Info (ArcView) ASCII grid file into GRASS, see
  53. <em><a href="r.in.gdal.html">r.in.gdal</a></em>.
  54. <p>
  55. SURFER (Golden Software) ASCII files may be imported by passing the <b>-s</b> flag.
  56. <h2>EXAMPLE</h2>
  57. The following is a sample <b>input</b> file to <em>r.in.ascii</em>:
  58. <div class="code"><pre>
  59. north: 4299000.00
  60. south: 4247000.00
  61. east: 528000.00
  62. west: 500000.00
  63. rows: 10
  64. cols: 15
  65. null: -9999
  66. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  67. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  68. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  69. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  70. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  71. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  72. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  73. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  74. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  75. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  76. </pre></div>
  77. <h2>SEE ALSO</h2>
  78. <em>
  79. <a href="r.import.html">r.import</a>,
  80. <a href="r.out.ascii.html">r.out.ascii</a>,
  81. <a href="r.in.gdal.html">r.in.gdal</a>,
  82. <a href="r.out.gdal.html">r.out.gdal</a>,
  83. <a href="r.in.bin.html">r.in.bin</a>,
  84. <a href="r3.in.ascii.html">r3.in.ascii</a>
  85. </em>
  86. <h2>AUTHOR</h2>
  87. Michael Shapiro, U.S. Army Construction Engineering Research Laboratory<br>
  88. Surfer support by Roger Miller
  89. <p><i>Last changed: $Date$</i>