v.out.ascii.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <h2>DESCRIPTION</h2>
  2. <em>v.out.ascii</em> converts a GRASS vector map in binary format to a
  3. GRASS vector map in <a href="vectorascii.html">ASCII format</a>. Using
  4. flag <b>-o</b> <em>v.out.ascii</em> output will be in old (version 4)
  5. ASCII format.
  6. <p>If the <b>output</b> parameter is not given then the data is sent
  7. to standard output.
  8. <h2>NOTES</h2>
  9. The <em><a href="v.in.ascii.html">v.in.ascii</a></em> module performs
  10. the function of <em>v.out.ascii</em> in reverse; i.e. it converts
  11. vector maps in ASCII format to their binary format. These two
  12. companion modules are useful both for importing and exporting vector
  13. maps between GRASS and other software, and for transferring data
  14. between machines.
  15. <p>If old version is requested, the <b>output</b> files
  16. from <em>v.out.ascii</em> is placed in
  17. the <tt>$LOCATION/$MAPSET/dig_ascii/</tt>
  18. and <tt>$LOCATION/$MAPSET/dig_att</tt> directory.
  19. <p>If <b>layer &gt; 0</b> then only features with a category number
  20. will be exported. Use <em><a href="v.category.html">v.category</a></em> to add
  21. them if needed or define <b>layer=-1</b> to export also features without category.
  22. <p><em>v.out.ascii</em> in the old version mode (<b>-o</b>) does not
  23. copy the <tt>dig_cats</tt> file associated with the binary
  24. vector <b>input</b> map to the new <b>output</b> file name. The user
  25. must copy the <tt>dig_cats</tt> file to the new <b>output</b> name if
  26. this is desired (e.g. using the UNIX <em>cp</em> command).
  27. <p>It is possible to output the coordinates of vertices in a non-points vector
  28. feature by first converting the vector feature to a points map with
  29. <em><a href="v.to.points.html">v.to.points</a></em> and then exporting
  30. with <em>v.out.ascii</em> in
  31. <b>points</b> mode.
  32. <h2>EXAMPLES</h2>
  33. <h3>Standard mode</h3>
  34. See <a href="vectorascii.html">ASCII format</a> specification.
  35. <p><div class="code"><pre>
  36. v.out.ascii input=quads format=standard
  37. ORGANIZATION: US Army Const. Eng. Rsch. Lab
  38. DIGIT DATE: May 1987
  39. DIGIT NAME: grass
  40. MAP NAME: Quads
  41. MAP DATE: May 1987
  42. MAP SCALE: 24000
  43. OTHER INFO:
  44. ZONE: 13
  45. MAP THRESH: 18.288000
  46. VERTI:
  47. B 4
  48. 599587.1820962 4914067.53414294
  49. 589639.15126831 4913922.5687301
  50. 589440.96838162 4927803.62500018
  51. 599375.87959179 4927959.83330436
  52. B 2
  53. 599375.87959179 4927959.83330436
  54. 599587.1820962 4914067.53414294
  55. B 4
  56. 599587.1820962 4914067.53414294
  57. 609541.5508239 4914236.0597482
  58. 609316.10665227 4928116.8490555
  59. 599375.87959179 4927959.83330436
  60. C 1 1
  61. 594125.63 4921115.58
  62. 1 1
  63. C 1 1
  64. 604433.84 4921087.1
  65. 1 2
  66. </pre></div>
  67. <h3>Point mode</h3>
  68. <div class="code"><pre>
  69. v.out.ascii input=quads format=point
  70. 594125.63|4921115.58|1
  71. 604433.84|4921087.1|2
  72. </pre></div>
  73. Print also selected attributes:
  74. <div class="code"><pre>
  75. v.out.ascii input=geodetic_pts format=point where="cat > 5 and cat <= 8" columns=GEOD_NAME
  76. 573638.06289275|271623.25042595|6|27 WC 6
  77. 574416.81289275|274116.65542595|7|27 WC 7
  78. 575301.31189275|275303.81342595|8|27 WC 8
  79. </pre></div>
  80. To print all attributes type <b>columns=*</b>:
  81. <div class="code"><pre>
  82. v.out.ascii input=geodetic_pts format=point where="cat > 5 and cat <= 8" columns=*
  83. 573638.06289275|271623.25042595|6|6|0.00000000|0.00000000|6|6|27 WC 6|573638.09200000|271623.24100000|0.00|0|1.00000000|1.00000000
  84. 574416.81289275|274116.65542595|7|7|0.00000000|0.00000000|7|7|27 WC 7|574416.84100000|274116.64900000|0.00|0|1.00000000|1.00000000
  85. 575301.31189275|275303.81342595|8|8|0.00000000|0.00000000|8|8|27 WC 8|575301.30600000|275303.82600000|0.00|0|1.00000000|1.00000000
  86. </pre></div>
  87. <h3>WKT mode</h3>
  88. WKT is abbreviation
  89. for <a href="http://en.wikipedia.org/wiki/Well-known_text">Well-known
  90. text</a>.
  91. <div class="code"><pre>
  92. v.out.ascii input=quads format=wkt
  93. POLYGON((599587.18209620 4914067.53414294, 589639.15126831 4913922.56873010,
  94. 589440.96838162 4927803.62500018, 599375.87959179 4927959.83330436,
  95. 599587.18209620 4914067.53414294))
  96. POLYGON((599587.18209620 4914067.53414294, 599375.87959179 4927959.83330436,
  97. 609316.10665227 4928116.84905550, 609541.55082390 4914236.05974820,
  98. 599587.18209620 4914067.53414294))
  99. </pre></div>
  100. <h2>SEE ALSO</h2>
  101. <em>
  102. <a href="v.category.html">v.category</a>,
  103. <a href="v.in.ascii.html">v.in.ascii</a>,
  104. <a href="v.to.points.html">v.to.points</a>
  105. </em>
  106. <p>
  107. <a href="vectorascii.html">GRASS ASCII vector format</a> specification<br>
  108. <a href="sql.html">GRASS SQL interface</a>
  109. <h2>AUTHORS</h2>
  110. Michael Higgins,
  111. U.S. Army Construction Engineering
  112. Research Laboratory
  113. <br>
  114. James Westervelt,
  115. U.S. Army Construction Engineering
  116. Research Laboratory
  117. <br>
  118. Radim Blazek, ITC-Irst, Trento, Italy
  119. <br>
  120. Attribute selection added by Martin Landa, Czech Technical University
  121. in Prague, Czech Republic (2008/12)
  122. <!--
  123. <p>
  124. <i>Last changed: $Date$</i>
  125. -->