1v.to.rast(1) Grass User's Manual v.to.rast(1)
2
3
4
6 v.to.rast - Converts a binary GRASS vector map layer into a GRASS
7 raster map layer.
8
10 vector
11
13 v.to.rast
14 v.to.rast help
15 v.to.rast input=name output=name [use=string] [column=name]
16 [layer=integer] [value=float] [rows=integer] [--overwrite]
17
18 Flags:
19 --overwrite
20
21 Parameters:
22 input=name
23 Name of input vector map
24
25 output=name
26 Name for output raster map
27
28 use=string
29 Source of raster values:
30 attr - read values from attribute table cat - use
31 category values val - use value specified by value
32 option z - use z coordinate (points or contours
33 only) dir - output as flow direction (lines only) Options:
34 attr,cat,val,z,dir Default: attr
35
36 column=name
37 Column name (type must be numeric)
38
39 layer=integer
40 Layer number Default: 1
41
42 value=float
43 Raster value Default: 1
44
45 rows=integer
46 number of rows to hold in memory Default: 4096
47
49 v.to.rast transforms GRASS vector map layers into GRASS raster map
50 layer format.
51
53 v.to.rast will only affect data in areas lying inside the boundaries of
54 the current geographic region. Before running v.to.rast, the user
55 should therefore ensure that the current geographic region is correctly
56 set and that the region resolution is at the desired level.
57
58 Either the column parameter or the value parameter must be specified.
59 The use option may be specified alone when using the dir option.
60
61 use options are:
62 attr - read values from attribute table (default) cat - read
63 values from category val - use value specified by value option
64 z - use z coordinate (points or contours only) dir - output
65 as flow direction in degrees (lines only)
66
67 The column parameter uses an existing column from the vector map data‐
68 base table as the category value in the output raster map. Existing ta‐
69 ble columns can be shown by using db.describe.
70
71 An empty raster map layer will be created if the vector map layer has
72 not been assigned category/attribute labels (e.g., through use of
73 v.category option=add).
74
75 Otherwise:
76 Labeled areas and/or centroids will produce filled raster cover‐
77 ages with edges that straddle the original area boundary as long
78 as the boundary is NOT labeled.
79 (Use v.category option=del type=boundary to remove.) Labeled
80 lines and boundaries will produce lines of raster cells which
81 touch the original vector line. This tends to be more aggressive
82 than area-only conversions. Points and orphaned centroids will
83 be converted into single cells on the resultant raster map.
84
85 Flow directions are given in degrees counterclockwise from east.
86
88 1. Convert a vector map and use column SPEED from attribute table
89
90 db.describe -c table=vect_map
91 ncols:3
92 Column 1: CAT
93 Column 2: SPEED
94 Column 3: WIDTH
95
96 v.to.rast in=vect_map out=raster_map col=SPEED
97
98
99 2. Calculate stream directions from a river vector map (Spearfish)
100
101 v.to.rast in=streams out=streamsdir use=dir
102
103
105 db.describe, v.category
106
108 Original code: Michael Shapiro, U.S. Army Construction Engineering
109 Research Laboratory
110 GRASS 6 updates: Radim Blazek, ITC-Irst, Trento, Italy
111 Stream directions: Jaro Hofierka and Helena Mitasova
112
113 Last changed: $Date: 2007/01/28 16:30:34 $
114
115 Full index
116
117
118
119GRASS 6.2.2 v.to.rast(1)