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