1v.what.rast(1) Grass User's Manual v.what.rast(1)
2
3
4
6 v.what.rast - Uploads raster values at positions of vector points to
7 the table
8
10 vector, raster, attribute table
11
13 v.what.rast
14 v.what.rast help
15 v.what.rast vector=name raster=string [layer=integer] column=string
16
17 Parameters:
18 vector=name
19 Name of input vector points map for which to edit attribute table
20
21 raster=string
22 Name of existing raster map to be queried
23
24 layer=integer
25 Layer number Default: 1
26
27 column=string
28 Column name (will be updated by raster values)
29
31 v.what.rast reads raster value for each point in the vector and updates
32 col column in vector attribute table by this value. The column should
33 be type number (integer, float, double, ... ).
34 If more points have the same category, attribute value is set to NULL.
35 If raster values is NULL, attribute value is set to NULL.
36
38 A) Reading values from raster map at position of vector points, writing
39 these values into column of vector map:
40
41 v.what.rast vect=pnt rast=demf col=valf
42
43
44 B) In case of a vector map without attached attribute table, first one
45 row for each category has to be generated. Then the new table can be
46 populated with values from the raster map query:
47
48 v.db.connect -p vectpoints
49 # .. no table yet.
50 echo 'create table vectpoints (cat integer, value integer)' | db.exe‐
51 cute
52 #link new table to vector map:
53 v.db.connect table=vectpoints map=vectpoints
54 #generate rows for each category:
55 v.to.db map=vectpoints option=cat
56 #query raster map and write values into vector table:
57 v.what.rast vect=vectpoints rast=rastmap col=value
58 #verify statistics of uploaded values:
59 v.univar map=vectpoints col=value type=point
60
61
63 v.drape, v.what.vect
64
66 Radim Blazek
67
68 Last changed: $Date: 2007/03/20 06:24:52 $
69
70 Full index
71
72
73
74GRASS 6.2.2 v.what.rast(1)