1vectorascii(1)              GRASS GIS User's Manual             vectorascii(1)
2
3
4

GRASS ASCII vector format specification

6       A  vector map in GRASS native vector format may contain a mix of primi‐
7       tives including points, lines, boundaries, centroids, areas, faces, and
8       kernels.  The  GRASS ASCII vector format may contain also a header with
9       various metadata (see example below).
10
11       The header is similar as the head file of vector binary format but con‐
12       tains bounding box also. Key words are:
13       ORGANIZATION
14       DIGIT DATE
15       DIGIT NAME
16       MAP NAME
17       MAP DATE
18       MAP SCALE
19       OTHER INFO
20       ZONE
21       WEST EDGE
22       EAST EDGE
23       SOUTH EDGE
24       NORTH EDGE
25       MAP THRESH
26
27       The body begins with the row:
28       VERTI:
29       followed by records of primitives:
30       TYPE NUMBER_OF_COORDINATES [NUMBER_OF_CATEGORIES]
31        X Y [Z]
32       ....
33        X Y [Z]
34       [ LAYER CATEGORY]
35       ....
36       [ LAYER CATEGORY]
37       Everything above in [ ] is optional.
38
39       The primitive codes are as follows:
40
41           •   ’P’: point
42
43           •   ’L’: line
44
45           •   ’B’: boundary
46
47           •   ’C’: centroid
48
49           •   ’F’: face (3D boundary)
50
51           •   ’K’: kernel (3D centroid)
52
53           •   ’A’:  area  (boundary) - better use ’B’; kept only for backward
54               compatibility
55       The coordinates are listed following the initial  line  containing  the
56       primitive code, the total number of coordinates in the series, and (op‐
57       tionally) the number of categories (1 for a single  layer,  higher  for
58       multiple layers).  Below that 1 or several lines follow to indicate the
59       layer number and the category number (ID).
60
61       The order of coordinates is
62       X Y [Z]
63       In pre-GRASS 6 versions of the ASCII format, the order  of  coordinates
64       was different:
65       Y X
66
67       Latitude/Longitude  data may be given in a number of ways.  Decimal de‐
68       grees must be positive or negative instead of using a  hemisphere  let‐
69       ter.  Mixed coordinates must use a hemisphere letter. Whole minutes and
70       seconds must always contain two digits (example: use 167:03:04.567; and
71       not 167:3:4.567).
72       Acceptable formats:
73       key: D=Degrees; M=Minutes; S=Seconds; h=Hemisphere (N,S,E,W)
74
75           •   (+/-)DDD.DDDDD
76
77           •   DDDh
78
79           •   DDD:MMh
80
81           •   DDD:MM.MMMMMh
82
83           •   DDD:MM:SSh
84
85           •   DDD:MM:SS.SSSSSh
86

EXAMPLES

88       ORGANIZATION: GRASS Development Team
89       DIGIT DATE:   1/9/2005
90       DIGIT NAME:   -
91       MAP NAME:     test
92       MAP DATE:     2005
93       MAP SCALE:    10000
94       OTHER INFO:   Test polygons
95       ZONE:  0
96       MAP THRESH:   0.500000
97       VERTI:
98       B  6
99        5958812.48844435 3400828.84221011
100        5958957.29887089 3400877.11235229
101        5959021.65906046 3400930.7458436
102        5959048.47580612 3400973.65263665
103        5959069.92920264 3401032.64947709
104        5958812.48844435 3400828.84221011
105       C  1 1
106        5958952.42189184 3400918.23126419
107        1 20
108       B  4
109        5959010.9323622 3401338.36037757
110        5959096.7459483 3401370.54047235
111        5959091.38259917 3401450.99070932
112        5959010.9323622 3401338.36037757
113       C  1 1
114        5959063.08352122 3401386.98533277
115        1 21
116       In  this case the vector map contains 2 boundaries (first boundary with
117       6 vertices, second with 4 vertices) without category  and  2  centroids
118       with category number 20 and 21 (layer 1).
119

SEE ALSO

121        v.in.ascii, v.out.ascii, v.edit
122

SOURCE CODE

124       Available at: GRASS ASCII vector format specification source code (his‐
125       tory)
126
127       Accessed: Saturday Jan 21 17:40:37 2023
128
129       Main index | Vector index | Topics index | Keywords index  |  Graphical
130       index | Full index
131
132       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
133
134
135
136GRASS 8.2.1                                                     vectorascii(1)
Impressum