1v.to.rast(1)                  Grass User's Manual                 v.to.rast(1)
2
3
4

NAME

6       v.to.rast   -  Converts  a  binary  GRASS vector map layer into a GRASS
7       raster map layer.
8

KEYWORDS

10       vector, raster, conversion
11

SYNOPSIS

13       v.to.rast
14       v.to.rast help
15       v.to.rast         input=name         output=name           [use=string]
16       [type=string[,string,...]]         [layer=integer]        [column=name]
17       [value=float]     [rows=integer]     [rgbcolumn=string]      [labelcol‐
18       umn=string]   [--overwrite]  [--verbose]  [--quiet]
19
20   Flags:
21       --overwrite
22           Allow output files to overwrite existing files
23
24       --verbose
25           Verbose module output
26
27       --quiet
28           Quiet module output
29
30   Parameters:
31       input=name
32           Name of input vector map
33
34       output=name
35           Name for output raster map
36
37       use=string
38           Source of raster values:
39                     attr  -  read values from attribute table      cat  - use
40           category  values        val   -  use  value  specified   by   value
41           option        z      -   use   z  coordinate  (points  or  contours
42           only)        dir  - output as flow direction (lines only)
43           Options: attr,cat,val,z,dir
44           Default: attr
45
46       type=string[,string,...]
47           Type
48           Feature type(s)
49           Options: point,line,area
50           Default: point,line,area
51
52       layer=integer
53           Layer number
54           A single vector map can be connected to multiple  database  tables.
55           This number determines which table to use.
56           Default: 1
57
58       column=name
59           Name of column for attr parameter (data type must be numeric)
60
61       value=float
62           Raster value
63           Default: 1
64
65       rows=integer
66           Number of rows to hold in memory
67           Default: 4096
68
69       rgbcolumn=string
70           Name of color definition column (with RRR:GGG:BBB entries)
71
72       labelcolumn=string
73           Name of column used as raster category labels
74

DESCRIPTION

76       v.to.rast  transforms  GRASS  vector  map  layers into GRASS raster map
77       layer format. Optionally, attributes can be converted into raster cate‐
78       gory labels.
79

NOTES

81       v.to.rast will only affect data in areas lying inside the boundaries of
82       the current geographic region.   Before  running  v.to.rast,  the  user
83       should therefore ensure that the current geographic region is correctly
84       set and that the region resolution is at the desired level.
85
86       Either the column parameter or the value parameter must  be  specified.
87       The use option may be specified alone when using the dir option.
88
89       use options are:
90              attr  -  read  values from attribute table (default) cat  - read
91              values from category val  - use value specified by value  option
92              z     - use z coordinate (points or contours only) dir  - output
93              as flow direction in degrees (lines only)
94
95       The column parameter uses an existing column from the vector map  data‐
96       base table as the category value in the output raster map. Existing ta‐
97       ble columns can be shown by using db.describe.
98
99       An empty raster map layer will be created if the vector map  layer  has
100       not  been  assigned  category/attribute  labels  (e.g.,  through use of
101       v.category option=add).
102
103       Otherwise:
104              Labeled areas and/or centroids will produce filled raster cover‐
105              ages with edges that straddle the original area boundary as long
106              as the boundary is NOT labeled.
107              (Use v.category option=del type=boundary  to  remove.)   Labeled
108              lines  and  boundaries  will produce lines of raster cells which
109              touch the original vector line. This tends to be more aggressive
110              than  area-only conversions.  Points and orphaned centroids will
111              be converted into single cells on the resultant raster map.
112
113       Flow directions are given in degrees counterclockwise from east.
114
115       Raster category labels are supported for all of use= except use=z.
116

EXAMPLES

118       1. Convert a vector map and use column SPEED from attribute table
119
120       db.describe -c table=vect_map
121       ncols:3
122       Column 1: CAT
123       Column 2: SPEED
124       Column 3: WIDTH
125
126       v.to.rast in=vect_map out=raster_map col=SPEED
127
128
129       2. Calculate stream directions from a river vector map (Spearfish)
130
131       v.to.rast in=streams out=streamsdir use=dir
132
133
134       3. Convert a vector polygon map to raster including descriptive  labels
135       (Spearfish)
136
137       v.to.rast in=fields out=myfields use=attr col=cat labelcol=label
138       r.category myfields
139
140

SEE ALSO

142        db.describe, v.category
143

AUTHORS

145       Original  code:  Michael  Shapiro,  U.S.  Army Construction Engineering
146       Research Laboratory
147       GRASS 6.0 updates: Radim Blazek, ITC-irst, Trento, Italy
148       Stream directions: Jaro Hofierka and Helena Mitasova
149       GRASS 6.3 code cleanup and label support: Brad Douglas
150
151       Last changed: $Date: 2008-02-19 21:18:46 +0100 (Tue, 19 Feb 2008) $
152
153       Full index
154
155       © 2003-2008 GRASS Development Team
156
157
158
159GRASS 6.3.0                                                       v.to.rast(1)
Impressum