1v.what.vect(1)              GRASS GIS User's Manual             v.what.vect(1)
2
3
4

NAME

6       v.what.vect   -  Uploads vector values at positions of vector points to
7       the table.
8

KEYWORDS

10       vector, sampling, database, position, querying, attribute table
11

SYNOPSIS

13       v.what.vect
14       v.what.vect --help
15       v.what.vect  map=name    [layer=string]    column=name   query_map=name
16       [query_layer=string]     query_column=name    [dmax=float]     [--help]
17       [--verbose]  [--quiet]  [--ui]
18
19   Flags:
20       --help
21           Print usage summary
22
23       --verbose
24           Verbose module output
25
26       --quiet
27           Quiet module output
28
29       --ui
30           Force launching GUI dialog
31
32   Parameters:
33       map=name [required]
34           Name of vector points map for which to edit attributes
35           Or data source for direct OGR access
36
37       layer=string
38           Layer number or name
39           Vector features can have category values in different layers.  This
40           number  determines  which  layer  to use. When used with direct OGR
41           access this is the layer name.
42           Default: 1
43
44       column=name [required]
45           Name of attribute column to be updated with the query result
46
47       query_map=name [required]
48           Name of vector map to be queried
49           Or data source for direct OGR access
50
51       query_layer=string
52           Layer number or name
53           Vector features can have category values in different layers.  This
54           number  determines  which  layer  to use. When used with direct OGR
55           access this is the layer name.
56           Default: 1
57
58       query_column=name [required]
59           Name of attribute column to be queried
60
61       dmax=float
62           Maximum query distance in map units (meters for ll)
63           Default: 0.0
64

DESCRIPTION

66       v.what.vect transfers attributes from the query_map’s  attribute  table
67       into  the  map’s  attribute  table.  The module can be used to transfer
68       attributes from the table of a polygon map into the attribute table  of
69       a point vector map, as well as the other way around, i.e., from a point
70       map into the attribute table of  a  polygon  map  (See  examples).  The
71       script is based on v.distance.
72

NOTES

74       The  upload  column  into  which  the  query results are stored must be
75       present in map. Use v.db.addcolumn to add one if needed.
76
77       Use the dmax parameter to control the query distance  tolerance,  i.e.,
78       how far map’s points/centroids can be from the query_map features.  For
79       further options, use v.distance.
80
81       In case of a multipoint input map with several points having  the  same
82       category  number,  it  can  happen that the query result is NULL if the
83       same category number falls into different query_map polygons.
84
85       When transferring attributes from a point map into a polygon map,  dmax
86       has to be larger than zero, i.e., it will be determined by the distance
87       between query points and polygon centroids. Importantly, distance is in
88       meters for latitude-longitude locations.
89
90       In  case  that  one  or both input vector maps are 3D, features need to
91       touch also in the 3rd dimension (z coordinate)  in  order  to  transfer
92       attributes.
93

EXAMPLES

95       In  this example, the ’hospitals’ point map in the North Carolina loca‐
96       tion is copied to the current mapset, a new attribute column  is  added
97       and the urban names from the ’urbanarea’ polygon map are transferred to
98       hospital points locations in ’myhospitals’ map:
99       g.copy vect=hospitals,myhospitals
100       v.db.addcolumn myhospitals column="urb_name varchar(25)"
101       v.what.vect myhospitals query_map=urbanarea column=urb_name query_column=NAME
102       # verification:
103       v.db.select myhospitals
104
105       In this example, city names, population  data  and  others  from  Geon‐
106       ames.org  country  files  are  transferred  to  selected EU CORINE lan‐
107       duse/landcover classes ("Continuous urban fabric", 111, and "Discontin‐
108       uous  urban  fabric",  112).  Note: The example is in UTM projection to
109       which the input maps have been projected beforehand.
110       # extract populated places from geonames
111       v.extract geonames_IT where="featurecla=’P’" output=geonames_IT_cities
112       # add new column
113       v.db.addcol corine_code111_112_cities column="gnameid double precision"
114       # transfer geonameid (3000m maximal distance between points and centroids)
115       v.what.vect corine_code111_112_cities query_map=geonames_IT_cities column=gnameid \
116                   query_column=geonameid dmax=3000
117       # now gnameid can be used for v.db.join to join further
118       # attributes from geonames.org
119

SEE ALSO

121        v.db.addcolumn, v.db.select,  v.distance,  v.rast.stats,  v.what.rast,
122       v.what.rast3, v.vect.stats
123

AUTHOR

125       Markus Neteler
126

SOURCE CODE

128       Available at: v.what.vect source code (history)
129
130       Main  index  | Vector index | Topics index | Keywords index | Graphical
131       index | Full index
132
133       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
134
135
136
137GRASS 7.8.5                                                     v.what.vect(1)
Impressum