1v.out.ascii(1) GRASS GIS User's Manual v.out.ascii(1)
2
3
4
6 v.out.ascii - Exports a vector map to a GRASS ASCII vector representa‐
7 tion.
8 By default only features with category are exported. To export all fea‐
9 tures use ’layer=-1’.
10
12 vector, export, output, ASCII
13
15 v.out.ascii
16 v.out.ascii --help
17 v.out.ascii [-ocr] input=name [layer=string]
18 [type=string[,string,...]] [output=name] [columns=name[,name,...]]
19 [cats=range] [where=sql_query] format=string [separator=character]
20 [precision=integer] [--overwrite] [--help] [--verbose] [--quiet]
21 [--ui]
22
23 Flags:
24 -o
25 Create old (version 4) ASCII file
26
27 -c
28 Include column names in output (points mode)
29
30 -r
31 Only export points falling within current 3D region (points mode)
32
33 --overwrite
34 Allow output files to overwrite existing files
35
36 --help
37 Print usage summary
38
39 --verbose
40 Verbose module output
41
42 --quiet
43 Quiet module output
44
45 --ui
46 Force launching GUI dialog
47
48 Parameters:
49 input=name [required]
50 Name of input vector map
51 Or data source for direct OGR access
52
53 layer=string
54 Layer number or name (’-1’ for all layers)
55 A single vector map can be connected to multiple database tables.
56 This number determines which table to use. When used with direct
57 OGR access this is the layer name.
58 Default: 1
59
60 type=string[,string,...]
61 Input feature type
62 Options: point, line, boundary, centroid, area, face, kernel
63 Default: point,line,boundary,centroid,area,face,kernel
64
65 output=name
66 Name for output ASCII file or ASCII vector name if ’-o’ is defined
67 If not given or ’-’ then standard output
68
69 columns=name[,name,...]
70 Name of attribute column(s) to be exported (point mode)
71 "*" for all columns
72
73 cats=range
74 Category values
75 Example: 1,3,7-9,13
76
77 where=sql_query
78 WHERE conditions of SQL statement without ’where’ keyword
79 Example: income < 1000 and population >= 10000
80
81 format=string [required]
82 Output format
83 Options: point, standard, wkt
84 Default: point
85 point: Simple point format (point per row)
86 standard: GRASS ASCII vector format
87 wkt: OGC well-known text
88
89 separator=character
90 Field separator
91 Field separator (points mode)
92 Default: pipe
93
94 precision=integer
95 Number of significant digits (floating point only)
96 Options: 0-32
97 Default: 8
98
100 v.out.ascii converts a GRASS vector map in binary format to a GRASS
101 vector map in ASCII format. Using flag -o v.out.ascii output will be in
102 old (version 4) ASCII format.
103
104 If the output parameter is not given then the data is sent to standard
105 output.
106
108 The v.in.ascii module performs the function of v.out.ascii in reverse;
109 i.e. it converts vector maps in ASCII format to their binary format.
110 These two companion modules are useful both for importing and exporting
111 vector maps between GRASS and other software, and for transferring data
112 between machines.
113
114 If old version is requested, the output files from v.out.ascii is
115 placed in the $LOCATION/$MAPSET/dig_ascii/ and $LOCA‐
116 TION/$MAPSET/dig_att directory.
117
118 If layer > 0 then only features with a category number will be ex‐
119 ported. Use v.category to add them if needed or define layer=-1 to ex‐
120 port also features without category.
121
122 v.out.ascii in the old version mode (-o) does not copy the dig_cats
123 file associated with the binary vector input map to the new output file
124 name. The user must copy the dig_cats file to the new output name if
125 this is desired (e.g. using the UNIX cp command).
126
127 It is possible to output the coordinates of vertices in a non-points
128 vector feature by first converting the vector feature to a points map
129 with v.to.points and then exporting with v.out.ascii in points mode.
130
132 Standard mode
133 See ASCII format specification.
134
135 v.out.ascii input=quads format=standard
136 ORGANIZATION: US Army Const. Eng. Rsch. Lab
137 DIGIT DATE: May 1987
138 DIGIT NAME: grass
139 MAP NAME: Quads
140 MAP DATE: May 1987
141 MAP SCALE: 24000
142 OTHER INFO:
143 ZONE: 13
144 MAP THRESH: 18.288000
145 VERTI:
146 B 4
147 599587.1820962 4914067.53414294
148 589639.15126831 4913922.5687301
149 589440.96838162 4927803.62500018
150 599375.87959179 4927959.83330436
151 B 2
152 599375.87959179 4927959.83330436
153 599587.1820962 4914067.53414294
154 B 4
155 599587.1820962 4914067.53414294
156 609541.5508239 4914236.0597482
157 609316.10665227 4928116.8490555
158 599375.87959179 4927959.83330436
159 C 1 1
160 594125.63 4921115.58
161 1 1
162 C 1 1
163 604433.84 4921087.1
164 1 2
165
166 Point mode
167 v.out.ascii input=quads format=point
168 594125.63|4921115.58|1
169 604433.84|4921087.1|2
170 Print also selected attributes:
171 v.out.ascii input=geodetic_pts format=point where="cat > 5 and cat <= 8" columns=GEOD_NAME
172 573638.06289275|271623.25042595|6|27 WC 6
173 574416.81289275|274116.65542595|7|27 WC 7
174 575301.31189275|275303.81342595|8|27 WC 8
175 To print all attributes type columns=*:
176 v.out.ascii input=geodetic_pts format=point where="cat > 5 and cat <= 8" columns=*
177 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
178 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
179 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
180
181 WKT mode
182 WKT is abbreviation for Well-known text.
183 v.out.ascii input=quads format=wkt
184 POLYGON((599587.18209620 4914067.53414294, 589639.15126831 4913922.56873010,
185 589440.96838162 4927803.62500018, 599375.87959179 4927959.83330436,
186 599587.18209620 4914067.53414294))
187 POLYGON((599587.18209620 4914067.53414294, 599375.87959179 4927959.83330436,
188 609316.10665227 4928116.84905550, 609541.55082390 4914236.05974820,
189 599587.18209620 4914067.53414294))
190
192 v.category, v.in.ascii, v.to.points
193
194 GRASS ASCII vector format specification
195 GRASS SQL interface
196
198 Michael Higgins, U.S. Army Construction Engineering Research Laboratory
199 James Westervelt, U.S. Army Construction Engineering Research Labora‐
200 tory
201 Radim Blazek, ITC-Irst, Trento, Italy
202 Attribute selection added by Martin Landa, Czech Technical University
203 in Prague, Czech Republic (2008/12)
204
206 Available at: v.out.ascii source code (history)
207
208 Accessed: Saturday Jan 21 20:40:06 2023
209
210 Main index | Vector index | Topics index | Keywords index | Graphical
211 index | Full index
212
213 © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
214
215
216
217GRASS 8.2.1 v.out.ascii(1)