-
-
Notifications
You must be signed in to change notification settings - Fork 308
/
vectorascii.html
136 lines (118 loc) · 3.37 KB
/
vectorascii.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!-- meta page description: GRASS ASCII vector format specification -->
<!-- meta page index: vector -->
A vector map in GRASS native vector format may contain a mix of
<i>primitives</i> including points, lines, boundaries, centroids, areas,
faces, and kernels. The GRASS ASCII vector format may contain also
a <i>header</i> with various metadata (see example below).
<p>The header is similar as the head file of vector binary format but
contains bounding box also. Key words are:
<div class="code"><pre>
ORGANIZATION
DIGIT DATE
DIGIT NAME
MAP NAME
MAP DATE
MAP SCALE
OTHER INFO
ZONE
WEST EDGE
EAST EDGE
SOUTH EDGE
NORTH EDGE
MAP THRESH
</pre></div>
<p>The body begins with the row:
<div class="code"><pre>
VERTI:
</pre></div>
followed by records of primitives:
<div class="code"><pre>
TYPE NUMBER_OF_COORDINATES [NUMBER_OF_CATEGORIES]
X Y [Z]
....
X Y [Z]
[ LAYER CATEGORY]
....
[ LAYER CATEGORY]
</pre></div>
Everything above in <tt>[ ]</tt> is optional.
<p>The primitive codes are as follows:
<ul>
<li>'P': point</li>
<li>'L': line</li>
<li>'B': boundary</li>
<li>'C': centroid</li>
<li>'F': face (3D boundary)</li>
<li>'K': kernel (3D centroid)</li>
<li>'A': area (boundary) - better use 'B'; kept only for backward compatibility</li>
</ul>
The coordinates are listed following the initial line containing the
primitive code, the total number of coordinates in the series, and
(optionally) the number of categories (1 for a single layer, higher
for multiple layers). Below that 1 or several lines follow to
indicate the layer number and the category number (ID).
<p>The order of coordinates is
<div class="code"><pre>
X Y [Z]
</pre></div>
In pre-GRASS 6 versions of the ASCII format, the order of coordinates
was different:
<div class="code"><pre>
Y X
</pre></div>
<p>Latitude/Longitude data may be given in a number of ways.
Decimal degrees must be positive or negative instead of using a hemisphere
letter. Mixed coordinates must use a hemisphere letter. Whole minutes and
seconds must always contain two digits (example: use <tt>167:03:04.567</tt>;
and not <tt>167:3:4.567</tt>).
<br><br>
Acceptable formats:<br>
<i>key: D=Degrees; M=Minutes; S=Seconds; h=Hemisphere (N,S,E,W)</i>
<ul>
<li><tt>(+/-)DDD.DDDDD</tt>
<li><tt>DDDh</tt>
<li><tt>DDD:MMh</tt>
<li><tt>DDD:MM.MMMMMh</tt>
<li><tt>DDD:MM:SSh</tt>
<li><tt>DDD:MM:SS.SSSSSh</tt>
</ul>
<h2>EXAMPLES</h2>
<div class="code"><pre>
ORGANIZATION: GRASS Development Team
DIGIT DATE: 1/9/2005
DIGIT NAME: -
MAP NAME: test
MAP DATE: 2005
MAP SCALE: 10000
OTHER INFO: Test polygons
ZONE: 0
MAP THRESH: 0.500000
VERTI:
B 6
5958812.48844435 3400828.84221011
5958957.29887089 3400877.11235229
5959021.65906046 3400930.7458436
5959048.47580612 3400973.65263665
5959069.92920264 3401032.64947709
5958812.48844435 3400828.84221011
C 1 1
5958952.42189184 3400918.23126419
1 20
B 4
5959010.9323622 3401338.36037757
5959096.7459483 3401370.54047235
5959091.38259917 3401450.99070932
5959010.9323622 3401338.36037757
C 1 1
5959063.08352122 3401386.98533277
1 21
</pre></div>
In this case the vector map contains 2 boundaries (first boundary with
6 vertices, second with 4 vertices) without category and 2 centroids
with category number 20 and 21 (layer 1).
<h2>SEE ALSO</h2>
<em>
<a href="v.in.ascii.html">v.in.ascii</a>,
<a href="v.out.ascii.html">v.out.ascii</a>,
<a href="v.edit.html">v.edit</a>
</em>