1v.out.ascii(1) Grass User's Manual v.out.ascii(1)
2
3
4
6 v.out.ascii - Converts a GRASS binary vector map to a GRASS ASCII vec‐
7 tor map.
8
10 vector
11
13 v.out.ascii
14 v.out.ascii help
15 v.out.ascii [-or] input=name [output=string] [format=string]
16 [fs=string] [dp=integer] [--verbose] [--quiet]
17
18 Flags:
19 -o
20 Create old (version 4) ASCII file
21
22 -r
23 Only export points falling within current 3D region (points mode)
24
25 --verbose
26 Verbose module output
27
28 --quiet
29 Quiet module output
30
31 Parameters:
32 input=name
33 Name of input vector map
34
35 output=string
36 Path to resulting ASCII file or ASCII vector name if '-o' is
37 defined
38
39 format=string
40 Output format
41 Options: point,standard
42 Default: point
43
44 fs=string
45 Field separator (points mode)
46 Default: |
47
48 dp=integer
49 Number of significant digits (floating point only)
50 Options: 0-32
51 Default: 8
52
54 v.out.ascii converts a GRASS vector map in binary format to a GRASS
55 vector map in ASCII format. Using flag -o v.out.ascii output will be in
56 old (version 4) ASCII format.
57
58 If the output parameter is not given then the coordinates of any point
59 data within the vector map is sent to stdout.
60
62 The GRASS program v.in.ascii performs the function of v.out.ascii in
63 reverse; i.e., it converts vector maps in ASCII format to their binary
64 format. These two companion programs are useful both for importing and
65 exporting vector maps between GRASS and other software, and for trans‐
66 ferring data between machines.
67
68 If the format parameter is set to standard, A GRASS ASCII vector map
69 will be exported, which may contain a mix of primitives including
70 points, lines, boundaries, centroids, areas, faces, and kernels. The
71 beginning of the output ascii file will contain a header listing any
72 metadata for the input vector, if such metadata exists. An example of
73 the standard format is given below.
74
75 The primitive codes are as follows:
76 ’P': point ’L': line ’B': boundary ’C': centroid ’F': face (3D
77 boundary) ’K': kernel (3D centroid) ’A': area (boundary) - bet‐
78 ter use 'B'; kept only for backward compatibility
79 The coordinates are listed following the initial line containing the
80 primitive code, the total number of vectors in the series, and the num‐
81 ber of categories (1 for a single layer, higher for multiple layers).
82 Below that 1 or several lines follow to indicate the layer number and
83 the category number (ID).
84
85 The order of coordinates for new (standard) version of ASCII file is
86 X Y [Z]
87
88 the order of coordinates for old version of ASCII file is
89 Y X
90
91 If old version is requested, the output files from v.out.ascii will be
92 placed in the $LOCATION/$MAPSET/dig_ascii/ and $LOCA‐
93 TION/$MAPSET/dig_att directory.
94
95 Only features with a category number will be exported. Use v.category
96 to add them if needed.
97
98 v.out.ascii does not copy the dig_cats file associated with the binary
99 vector input map to the new output file name. The user must copy the
100 dig_cats file to the new output name if this is desired (e.g., using
101 the UNIX cp command).
102
103 It is possible to output the coordinates of vertices in a non-points
104 vector feature by first converting the vector feature to a points map
105 with v.to.points and then exporting with v.out.ascii in points mode.
106
108 Example 1a) - standard mode - using the 'quads' vector from Spearfish
109 dataset:
110
111 v.out.ascii input=quads format=standard
112 ORGANIZATION: US Army Const. Eng. Rsch. Lab
113 DIGIT DATE: May 1987
114 DIGIT NAME: grass
115 MAP NAME: Quads
116 MAP DATE: May 1987
117 MAP SCALE: 24000
118 OTHER INFO:
119 ZONE: 13
120 MAP THRESH: 18.288000
121 VERTI:
122 B 4
123 599587.1820962 4914067.53414294
124 589639.15126831 4913922.5687301
125 589440.96838162 4927803.62500018
126 599375.87959179 4927959.83330436
127 B 2
128 599375.87959179 4927959.83330436
129 599587.1820962 4914067.53414294
130 B 4
131 599587.1820962 4914067.53414294
132 609541.5508239 4914236.0597482
133 609316.10665227 4928116.8490555
134 599375.87959179 4927959.83330436
135 C 1 1
136 594125.63 4921115.58
137 1 1
138 C 1 1
139 604433.84 4921087.1
140 1 2
141
142
143 Example 1b) - point mode
144
145 v.out.ascii input=quads format=point
146 594125.63|4921115.58|1
147 604433.84|4921087.1|2
148
149
151 v.category
152 v.in.ascii
153 v.to.points
154 Vector ASCII Format Specification
155
157 Michael Higgins, U.S. Army Construction Engineering Research Laboratory
158 James Westervelt, U.S. Army Construction Engineering Research Labora‐
159 tory
160 Radim Blazek, ITC-Irst, Trento, Italy
161
162 Last changed: $Date: 2006-12-13 17:10:28 +0100 (Wed, 13 Dec 2006) $
163
164 Full index
165
166 © 2003-2008 GRASS Development Team
167
168
169
170GRASS 6.3.0 v.out.ascii(1)