3
<em>v.out.ascii</em> converts a GRASS vector map in binary format to a
4
GRASS vector map in ASCII format. Using
5
flag <b>-o</b> <em>v.out.ascii</em> output will be in old (version 4)
9
If the <b>output</b> parameter is not given then the coordinates of any
10
<em>point</em> data within the vector map is sent to stdout.
14
The <em><a href="v.in.ascii.html">v.in.ascii</a></em> module performs
15
the function of <em>v.out.ascii</em> in reverse; i.e. it converts
16
vector maps in ASCII format to their binary format. These two
17
companion module are useful both for importing and exporting vector
18
maps between GRASS and other software, and for transferring data
22
If the <b>format</b> parameter is set to <b>standard</b>, a GRASS
23
ASCII vector map will be exported, which may contain a mix of
24
primitives including points, lines, boundaries, centroids, areas,
25
faces, and kernels. The beginning of the output ascii file will
26
contain a header listing any metadata for the input vector map, if
27
such metadata exists. An example of the <b>standard</b> format is
30
<p>The header is similar as the head file of vector binary format but
31
contains bounding box also. Key words are:
49
<p>The body begins with the row:
55
followed by records of primitives:
58
TYPE NUMBER_OF_COORDINATES [NUMBER_OF_CATEGORIES]
67
Everything above in <tt>[ ]</tt> is optional.
70
The primitive codes are as follows:
74
<li>'B': boundary</li>
75
<li>'C': centroid</li>
76
<li>'F': face (3D boundary)</li>
77
<li>'K': kernel (3D centroid)</li>
78
<li>'A': area (boundary) - better use 'B'; kept only for backward compatibility</li>
81
The coordinates are listed following the initial line containing the
82
primitive code, the total number of vectors in the series, and (optionally)
83
the number of categories (1 for a single layer, higher for multiple layers).
84
Below that 1 or several lines follow to indicate the layer number and
85
the category number (ID).
87
The order of coordinates is
88
<div class="code"><pre>
92
In pre-GRASS 6 versions of the ASCII file, the order of coordinates is:
93
<div class="code"><pre>
97
If old version is requested, the <b>output</b> files from <em>v.out.ascii</em> is placed
98
in the <tt>$LOCATION/$MAPSET/dig_ascii/</tt> and <tt>$LOCATION/$MAPSET/dig_att</tt> directory.
101
Only features with a category number will be
102
exported. Use <em>v.category</em> to add them if needed.
105
<em>v.out.ascii</em> does not copy the <em>dig_cats</em> file
106
associated with the binary vector <em>input</em> map to the
107
new <em>output</em> file name. The user must copy
108
the <em>dig_cats</em> file to the new <em>output</em> name if this is
109
desired (e.g. using the UNIX <em>cp</em> command).
112
It is possible to output the coordinates of vertices in a non-points vector
113
feature by first converting the vector feature to a points map with
114
<em>v.to.points</em> and then exporting with <em>v.out.ascii</em> in
115
<em>points</em> mode.
119
<h3>Standard mode</h3>
122
<div class="code"><pre>
123
v.out.ascii input=quads format=standard
125
ORGANIZATION: US Army Const. Eng. Rsch. Lab
133
MAP THRESH: 18.288000
136
599587.1820962 4914067.53414294
137
589639.15126831 4913922.5687301
138
589440.96838162 4927803.62500018
139
599375.87959179 4927959.83330436
141
599375.87959179 4927959.83330436
142
599587.1820962 4914067.53414294
144
599587.1820962 4914067.53414294
145
609541.5508239 4914236.0597482
146
609316.10665227 4928116.8490555
147
599375.87959179 4927959.83330436
158
<div class="code"><pre>
159
v.out.ascii input=quads format=point
161
594125.63|4921115.58|1
162
604433.84|4921087.1|2
165
<div class="code"><pre>
166
v.out.ascii input=archsites format=point where="cat > 5 and cat <= 8" columns=str1
168
600375|4925235|6|Prairie Site
169
606635|4920773|7|Jensen Pass
170
595755|4925300|8|No Name
176
<a href="v.category.html">v.category</a>,
177
<a href="v.in.ascii.html">v.in.ascii</a>,
178
<a href="v.to.points.html">v.to.points</a><br>
179
<a HREF="sql.html">GRASS SQL interface</a>
185
U.S. Army Construction Engineering
189
U.S. Army Construction Engineering
192
Radim Blazek, ITC-Irst, Trento, Italy
194
Attribute selection added by Martin Landa, CTU in Prague, Czech Republic (2008/12)
197
<i>Last changed: $Date: 2010-02-17 08:56:18 +0100 (Wed, 17 Feb 2010) $</i>