1d.vect(1) Grass User's Manual d.vect(1)
2
3
4
6 d.vect - Displays user-specified vector map in the active graphics
7 frame.
8
10 display, graphics, vector, level1
11
13 d.vect
14 d.vect --help
15 d.vect [-cirs] map=name [layer=string] display=string[,string,...]
16 [type=string[,string,...]] [cats=range] [where=sql_query]
17 [color=name] [fill_color=name] [rgb_column=name] [zcolor=style]
18 [width=integer] [width_column=name] [width_scale=float]
19 [icon=string] [size=float] [size_column=name] [rotation_col‐
20 umn=name] [icon_area=string] [icon_line=string] [leg‐
21 end_label=string] [label_layer=string] [attribute_column=name]
22 [label_color=name] [label_bgcolor=name] [label_bcolor=name]
23 [label_size=integer] [font=string] [encoding=string]
24 [xref=string] [yref=string] [minreg=float] [maxreg=float]
25 [--help] [--verbose] [--quiet] [--ui]
26
27 Flags:
28 -c
29 Random colors according to category number (or layer number if
30 ’layer=-1’ is given)
31
32 -i
33 Use values from ’cats’ option as feature id
34
35 -r
36 Use square root of the value of size_column
37 This makes circle areas proportionate to the size_column values
38 instead of circle radius
39
40 -s
41 Do not show this layer in vector legend
42
43 --help
44 Print usage summary
45
46 --verbose
47 Verbose module output
48
49 --quiet
50 Quiet module output
51
52 --ui
53 Force launching GUI dialog
54
55 Parameters:
56 map=name [required]
57 Name of vector map
58 Or data source for direct OGR access
59
60 layer=string
61 Layer number or name (’-1’ for all layers)
62 A single vector map can be connected to multiple database tables.
63 This number determines which table to use. When used with direct
64 OGR access this is the layer name.
65 Default: 1
66
67 display=string[,string,...]Â [required]
68 Display
69 Options: shape, cat, topo, vert, dir, zcoor
70 Default: shape
71 shape: Display geometry of features
72 cat: Display category numbers of features
73 topo: Display topology information (nodes, edges)
74 vert: Display vertices of features
75 dir: Display direction of linear features
76 zcoor: Display z-coordinate of features (only for 3D vector maps)
77
78 type=string[,string,...]
79 Input feature type
80 Options: point, line, boundary, centroid, area, face
81 Default: point,line,area,face
82
83 cats=range
84 Category values
85 Example: 1,3,7-9,13
86
87 where=sql_query
88 WHERE conditions of SQL statement without ’where’ keyword
89 Example: income < 1000 and population >= 10000
90
91 color=name
92 Feature color
93 Either a standard color name, R:G:B triplet, or "none"
94 Default: black
95
96 fill_color=name
97 Area fill color
98 Either a standard color name, R:G:B triplet, or "none"
99 Default: 200:200:200
100
101 rgb_column=name
102 Colorize features according to color definition column
103 Color definition in R:G:B form
104
105 zcolor=style
106 Colorize point or area features according to z-coordinate
107 Options: aspect, aspectcolr, bcyr, bgyr, blues, byg, byr, celsius,
108 corine, curvature, differences, elevation, etopo2, evi, fahrenheit,
109 gdd, grass, greens, grey, grey.eq, grey.log, grey1.0, grey255, gyr,
110 haxby, inferno, kelvin, magma, ndvi, ndwi, oranges, plasma, popula‐
111 tion, population_dens, precipitation, precipitation_daily, precipi‐
112 tation_monthly, rainbow, ramp, random, reds, roygbiv, rstcurv, ryb,
113 ryg, sepia, slope, soilmoisture, srtm, srtm_plus, terrain, viridis,
114 water, wave
115 aspect: aspect oriented grey colors [range: map values]
116 aspectcolr: aspect oriented rainbow colors [range: 0 to 360]
117 bcyr: blue through cyan through yellow to red [range: map values]
118 bgyr: blue through green through yellow to red [range: map values]
119 blues: white to blue [range: map values]
120 byg: blue through yellow to green [range: map values]
121 byr: blue through yellow to red [range: map values]
122 celsius: blue to red for degree Celsius temperature [range: -80 to
123 80]
124 corine: EU Corine land cover colors [range: 111 to 995]
125 curvature: for terrain curvatures (from v.surf.rst and
126 r.slope.aspect) [range: map values]
127 differences: differences oriented colors [range: map values]
128 elevation: maps relative ranges of raster values to elevation
129 color ramp [range: map values]
130 etopo2: colors for ETOPO2 worldwide bathymetry/topography [range:
131 -11000 to 8850]
132 evi: enhanced vegetative index colors [range: -1 to 1]
133 fahrenheit: blue to red for Fahrenheit temperature [range: -112 to
134 176]
135 gdd: accumulated growing degree days [range: 0 to 6000]
136 grass: GRASS GIS green (perceptually uniform) [range: map values]
137 greens: white to green [range: map values]
138 grey: grey scale [range: map values]
139 grey.eq: histogram-equalized grey scale [range: map values]
140 grey.log: histogram logarithmic transformed grey scale [range: map
141 values]
142 grey1.0: grey scale for raster values between 0.0-1.0 [range: 0 to
143 1]
144 grey255: grey scale for raster values between 0-255 [range: 0 to
145 255]
146 gyr: green through yellow to red [range: map values]
147 haxby: relative colors for bathymetry or topography [range: map
148 values]
149 inferno: perceptually uniform sequential color table inferno
150 [range: map values]
151 kelvin: blue to red for temperature in Kelvin scale [range: 193.15
152 to 353.15]
153 magma: perceptually uniform sequential color table magma [range:
154 map values]
155 ndvi: Normalized Difference Vegetation Index colors [range: -1 to
156 1]
157 ndwi: Normalized Difference Water Index colors [range: -200 to
158 200]
159 oranges: white to orange [range: map values]
160 plasma: perceptually uniform sequential color table plasma [range:
161 map values]
162 population: color table covering human population classification
163 breaks [range: 0 to 2e+09]
164 population_dens: color table covering human population density
165 classification breaks [range: 0 to 1e+09]
166 precipitation: precipitation color table (0..2000mm) [range: 0 to
167 7000]
168 precipitation_daily: precipitation color table (0..1000mm) [range:
169 0 to 10000]
170 precipitation_monthly: precipitation color table (0..1000mm)
171 [range: 0 to 1000]
172 rainbow: rainbow color table [range: map values]
173 ramp: color ramp [range: map values]
174 random: random color table [range: map values]
175 reds: white to red [range: map values]
176 roygbiv: [range: map values]
177 rstcurv: terrain curvature (from r.resamp.rst) [range: map values]
178 ryb: red through yellow to blue [range: map values]
179 ryg: red through yellow to green [range: map values]
180 sepia: yellowish-brown through to white [range: map values]
181 slope: r.slope.aspect-type slope colors for raster values 0-90
182 [range: 0 to 90]
183 soilmoisture: soilmoisture color table (0.0-1.0) [range: 0 to 1]
184 srtm: color palette for Shuttle Radar Topography Mission elevation
185 [range: -11000 to 8850]
186 srtm_plus: color palette for Shuttle Radar Topography Mission ele‐
187 vation (with seafloor colors) [range: -11000 to 8850]
188 terrain: global elevation color table covering -11000 to +8850m
189 [range: -11000 to 8850]
190 viridis: perceptually uniform sequential color table viridis
191 [range: map values]
192 water: water depth [range: map values]
193 wave: color wave [range: map values]
194
195 width=integer
196 Line width
197 Default: 0
198
199 width_column=name
200 Name of numeric column containing line width
201 These values will be scaled by width_scale
202
203 width_scale=float
204 Scale factor for width_column
205 Default: 1
206
207 icon=string
208 Point and centroid symbol
209 Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3,
210 basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3,
211 basic/diamond, basic/hexagon, basic/marker, basic/octagon,
212 basic/pin, basic/pin_dot, basic/point, basic/pushpin, basic/star,
213 basic/triangle, basic/x, demo/muchomurka, demo/smrk,
214 extra/4pt_star, extra/adcp, extra/airport, extra/alpha_flag,
215 extra/bridge, extra/dim_arrow, extra/dive_flag, extra/fiducial,
216 extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne,
217 extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon,
218 extra/ping, extra/ring, extra/simple_zia, extra/target, geol‐
219 ogy/circle_cross, geology/half-arrow_left, geol‐
220 ogy/half-arrow_right, geology/strike_box, geology/strike_circle,
221 geology/strike_cleavage, geology/strike_half-bowtie, geol‐
222 ogy/strike_line, geology/strike_parallel, geology/strike_triangle,
223 legend/area, legend/area_curved, legend/line, legend/line_crooked,
224 n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a,
225 n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3,
226 n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6,
227 n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a,
228 n_arrows/n_arrow8b, n_arrows/n_arrow9
229 Default: basic/x
230
231 size=float
232 Symbol size
233 When used with the size_column option this becomes the scale factor
234 Default: 5
235
236 size_column=name
237 Name of numeric column containing symbol size
238
239 rotation_column=name
240 Name of numeric column containing symbol rotation angle
241 Measured in degrees CCW from east
242
243 icon_area=string
244 Area/boundary symbol for legend
245 Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3,
246 basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3,
247 basic/diamond, basic/hexagon, basic/marker, basic/octagon,
248 basic/pin, basic/pin_dot, basic/point, basic/pushpin, basic/star,
249 basic/triangle, basic/x, demo/muchomurka, demo/smrk,
250 extra/4pt_star, extra/adcp, extra/airport, extra/alpha_flag,
251 extra/bridge, extra/dim_arrow, extra/dive_flag, extra/fiducial,
252 extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne,
253 extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon,
254 extra/ping, extra/ring, extra/simple_zia, extra/target, geol‐
255 ogy/circle_cross, geology/half-arrow_left, geol‐
256 ogy/half-arrow_right, geology/strike_box, geology/strike_circle,
257 geology/strike_cleavage, geology/strike_half-bowtie, geol‐
258 ogy/strike_line, geology/strike_parallel, geology/strike_triangle,
259 legend/area, legend/area_curved, legend/line, legend/line_crooked,
260 n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a,
261 n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3,
262 n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6,
263 n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a,
264 n_arrows/n_arrow8b, n_arrows/n_arrow9
265 Default: legend/area
266
267 icon_line=string
268 Line symbol for legend
269 Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3,
270 basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3,
271 basic/diamond, basic/hexagon, basic/marker, basic/octagon,
272 basic/pin, basic/pin_dot, basic/point, basic/pushpin, basic/star,
273 basic/triangle, basic/x, demo/muchomurka, demo/smrk,
274 extra/4pt_star, extra/adcp, extra/airport, extra/alpha_flag,
275 extra/bridge, extra/dim_arrow, extra/dive_flag, extra/fiducial,
276 extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne,
277 extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon,
278 extra/ping, extra/ring, extra/simple_zia, extra/target, geol‐
279 ogy/circle_cross, geology/half-arrow_left, geol‐
280 ogy/half-arrow_right, geology/strike_box, geology/strike_circle,
281 geology/strike_cleavage, geology/strike_half-bowtie, geol‐
282 ogy/strike_line, geology/strike_parallel, geology/strike_triangle,
283 legend/area, legend/area_curved, legend/line, legend/line_crooked,
284 n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a,
285 n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3,
286 n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6,
287 n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a,
288 n_arrows/n_arrow8b, n_arrows/n_arrow9
289 Default: legend/line
290
291 legend_label=string
292 Label to display after symbol in vector legend
293
294 label_layer=string
295 Layer number for labels (default: the given layer number)
296 Vector features can have category values in different layers. This
297 number determines which layer to use. When used with direct OGR
298 access this is the layer name.
299 Default: 1
300
301 attribute_column=name
302 Name of column to be displayed as a label
303
304 label_color=name
305 Label color
306 Either a standard color name or R:G:B triplet
307 Default: red
308
309 label_bgcolor=name
310 Label background color
311 Either a standard color name, R:G:B triplet, or "none"
312 Default: none
313
314 label_bcolor=name
315 Label border color
316 Either a standard color name, R:G:B triplet, or "none"
317 Default: none
318
319 label_size=integer
320 Label size (pixels)
321 Default: 8
322
323 font=string
324 Font name
325
326 encoding=string
327 Text encoding
328
329 xref=string
330 Label horizontal justification
331 Options: left, center, right
332 Default: left
333
334 yref=string
335 Label vertical justification
336 Options: top, center, bottom
337 Default: center
338
339 minreg=float
340 Minimum region size (average from height and width) when map is
341 displayed
342
343 maxreg=float
344 Maximum region size (average from height and width) when map is
345 displayed
346
348 d.vect displays vector maps in the active frame on the graphics moni‐
349 tor.
350
352 d.vect can simply be used typing d.vect map=vector_map. There are a
353 large variety of optional parameters which allow the user to specify
354 vector type, colors, data fields, SQL queries, label size and justifi‐
355 cation, etc.
356
357 By default d.vect areas are filled with fill_color and outlined with
358 color. Area outlines can be suppressed with
359 d.vect map=vector_map color=none
360 and areas can be made transparent with
361 d.vect map=vector_map fill_color=none
362
363 In order to display attributes in the map, attribute_column must be
364 specified.
365
366 Feature colors may be specified by v.colors in a form of color table or
367 in an attribute table column containing RRR:GGG:BBB values.
368
369 A table for a vector map might look like this:
370 db.select sql="select * from testisola"
371 cat|label|GRASSRGB
372 0|no data|255:255:255
373 90|FRASSILONGO|23:245:67
374 104|LEVICO|23:145:67
375 139|PERGINE VALSUGANA|223:45:237
376 168|SANT’ORSOLA|223:45:67
377 190|TENNA|123:45:67
378
379 To add the GRASSRGB color column, use v.db.addcolumn:
380 v.db.addcolumn map=testisola columns="GRASSRGB varchar(11)"
381
382 To add/change a color, use v.db.update:
383 v.db.update map=testisola column=GRASSRGB value="123:45:237" where="cat=139"
384
385 A much simpler method of color coding is by using the -c flag which
386 displays vector elements of like category number with a random color.
387
388 This module can use FreeType/TrueType fonts if they have already been
389 selected with d.font.
390
391 Parameter width is set by default to ’0’. XDRIVER specifies the precise
392 behaviour for non-zero line width, but drivers have some freedom as to
393 how zero-width lines are handled, so they can use the hardware’s "thin
394 line" drawing primitive, if it has one. A width of zero can potentially
395 result in significantly faster operation. On drivers where there is no
396 such thing as a "thin" line, the driver will use a sensible default
397 (which might not be the same as ’1’).
398
400 Spearfish examples:
401 # display roads with category numbers:
402 d.vect map=roads display=shape,cat label_color=green
403 # display randomly colorized soils map with attributes
404 d.vect -c map=soils attribute_column=label
405 # display randomly colorized selected vectors from soils map
406 d.vect -c map=soils where="label=’VBF’" display=shape attribute_column=label
407
408 3D points, 3D lines and 3D polygons colorized according to z height
409 (for 3D lines and polygons a z height is computed by a midpoint of
410 line/area bounding box):
411 g.region raster=elevation.10m
412 r.random input=elevation.10m n=5000 vector=random3d -d
413 d.mon start=x0
414 # display as black points
415 d.vect map=random3d
416 # display 3D points colorized according to z height
417 d.vect map=random3d zcolor=gyr
418 # 3D contour lines
419 r.contour input=elevation.10m output=contour20m step=20
420 d.vect map=contour20m zcolor=gyr
421 # generate 3D triangles
422 v.delaunay input=random3d output=random3d_del
423 # display 3D polygons colorized according to z height
424 d.vect map=random3d_del type=area zcolor=gyr
425
427 v.colors, d.erase, d.rast, v.colors, v.db.addcolumn, v.db.update
428
429 GRASS SQL interface
430
432 CERL
433 Radim Blazek, ITC-Irst, Trento, Italy
434 Support for color tables by Martin Landa, Czech Technical University in
435 Prague (8/2011)
436 and many other GRASS developers
437
439 Available at: d.vect source code (history)
440
441 Main index | Display index | Topics index | Keywords index | Graphical
442 index | Full index
443
444 © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
445
446
447
448GRASS 7.8.2 d.vect(1)