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=name [layer=integer] column=string
16 [where=sql_query] [--verbose] [--quiet]
17
18 Parameters:
19 vector=name
20 Name of input vector points map for which to edit attribute table
21
22 raster=name
23 Name of existing raster map to be queried
24
25 layer=integer
26 Layer number
27 A single vector map can be connected to multiple database tables.
28 This number determines which table to use.
29 Default: 1
30
31 column=string
32 Column name (will be updated by raster values)
33
34 where=sql_query
35 WHERE conditions of SQL statement without 'where' keyword
36 Example: income = 10000
37
39 v.what.rast reads raster value for each point in the vector and updates
40 col column in vector attribute table by this value. The column should
41 be type number (integer, float, double, ... ).
42 If more points have the same category, attribute value is set to NULL.
43 If raster values is NULL, attribute value is set to NULL.
44
46 v.what.rast operates on the attribute table. To modify the vector geom‐
47 etry instead, use v.drape.
48
50 A) Reading values from raster map at position of vector points, writing
51 these values into column of vector map:
52
53 v.what.rast vect=pnts rast=elevation col=heights
54
55
56 B) In case of a vector map without attached attribute table, first add
57 a new attribute table. This table is then populated with values queried
58 from the raster map:
59
60 v.db.connect -p vectpoints
61 # .. no table yet.
62 # add new table, link to map:
63 v.db.addtable vectpoints col="cat integer, myvalue integer, otherval
64 double precision"
65 # query raster map and upload values to vector table into specified
66 column:
67 v.what.rast vect=vectpoints rast=rastmap col=myvalue
68 # verify new attribute table:
69 v.db.select vectpoints
70 # verify statistics of uploaded values:
71 v.univar map=vectpoints col=myvalue type=point
72
73
75 v.db.addtable, v.db.select, v.drape, v.univar, v.rast.stats,
76 v.what.vect
77
79 Radim Blazek
80
81 Last changed: $Date: 2007-06-10 13:23:21 +0200 (Sun, 10 Jun 2007) $
82
83 Full index
84
85 © 2003-2008 GRASS Development Team
86
87
88
89GRASS 6.3.0 v.what.rast(1)