1d.vect(1) GRASS GIS 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 forest_cover, gdd, grass, greens, grey, grey.eq, grey.log, grey1.0,
110 grey255, gyr, haxby, inferno, kelvin, magma, ndvi, ndwi, nlcd,
111 oranges, plasma, population, population_dens, precipitation, pre‐
112 cipitation_daily, precipitation_monthly, rainbow, ramp, random,
113 reds, roygbiv, rstcurv, ryb, ryg, sepia, slope, soilmoisture, srtm,
114 srtm_plus, terrain, viridis, 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 forest_cover: percentage of forest cover [range: 0 to 100]
136 gdd: accumulated growing degree days [range: 0 to 6000]
137 grass: GRASS GIS green (perceptually uniform) [range: map values]
138 greens: white to green [range: map values]
139 grey: grey scale [range: map values]
140 grey.eq: histogram-equalized grey scale [range: map values]
141 grey.log: histogram logarithmic transformed grey scale [range: map
142 values]
143 grey1.0: grey scale for raster values between 0.0-1.0 [range: 0 to
144 1]
145 grey255: grey scale for raster values between 0-255 [range: 0 to
146 255]
147 gyr: green through yellow to red [range: map values]
148 haxby: relative colors for bathymetry or topography [range: map
149 values]
150 inferno: perceptually uniform sequential color table inferno
151 [range: map values]
152 kelvin: blue to red for temperature in Kelvin scale [range: 193.15
153 to 353.15]
154 magma: perceptually uniform sequential color table magma [range:
155 map values]
156 ndvi: Normalized Difference Vegetation Index colors [range: -1 to
157 1]
158 ndwi: Normalized Difference Water Index colors [range: -200 to
159 200]
160 nlcd: US National Land Cover Dataset colors [range: 0 to 95]
161 oranges: white to orange [range: map values]
162 plasma: perceptually uniform sequential color table plasma [range:
163 map values]
164 population: color table covering human population classification
165 breaks [range: 0 to 2e+09]
166 population_dens: color table covering human population density
167 classification breaks [range: 0 to 1e+09]
168 precipitation: precipitation color table (0..2000mm) [range: 0 to
169 7000]
170 precipitation_daily: precipitation color table (0..1000mm) [range:
171 0 to 10000]
172 precipitation_monthly: precipitation color table (0..1000mm)
173 [range: 0 to 1000]
174 rainbow: rainbow color table [range: map values]
175 ramp: color ramp [range: map values]
176 random: random color table [range: map values]
177 reds: white to red [range: map values]
178 roygbiv: [range: map values]
179 rstcurv: terrain curvature (from r.resamp.rst) [range: map values]
180 ryb: red through yellow to blue [range: map values]
181 ryg: red through yellow to green [range: map values]
182 sepia: yellowish-brown through to white [range: map values]
183 slope: r.slope.aspect-type slope colors for raster values 0-90
184 [range: 0 to 90]
185 soilmoisture: soilmoisture color table (0.0-1.0) [range: 0 to 1]
186 srtm: color palette for Shuttle Radar Topography Mission elevation
187 [range: -11000 to 8850]
188 srtm_plus: color palette for Shuttle Radar Topography Mission ele‐
189 vation (with seafloor colors) [range: -11000 to 8850]
190 terrain: global elevation color table covering -11000 to +8850m
191 [range: -11000 to 8850]
192 viridis: perceptually uniform sequential color table viridis
193 [range: map values]
194 water: water depth [range: map values]
195 wave: color wave [range: map values]
196
197 width=integer
198 Line width
199 Default: 0
200
201 width_column=name
202 Name of numeric column containing line width
203 These values will be scaled by width_scale
204
205 width_scale=float
206 Scale factor for width_column
207 Default: 1
208
209 icon=string
210 Point and centroid symbol
211 Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3,
212 basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3,
213 basic/diamond, basic/hexagon, basic/marker, basic/octagon,
214 basic/pin, basic/pin_dot, basic/point, basic/pushpin, basic/star,
215 basic/triangle, basic/x, demo/muchomurka, demo/smrk,
216 extra/4pt_star, extra/adcp, extra/airport, extra/alpha_flag,
217 extra/bridge, extra/dim_arrow, extra/dive_flag, extra/fiducial,
218 extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne,
219 extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon,
220 extra/ping, extra/ring, extra/simple_zia, extra/target, geol‐
221 ogy/circle_cross, geology/half-arrow_left, geol‐
222 ogy/half-arrow_right, geology/strike_box, geology/strike_circle,
223 geology/strike_cleavage, geology/strike_half-bowtie, geol‐
224 ogy/strike_line, geology/strike_parallel, geology/strike_triangle,
225 legend/area, legend/area_curved, legend/line, legend/line_crooked,
226 n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a,
227 n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3,
228 n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6,
229 n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a,
230 n_arrows/n_arrow8b, n_arrows/n_arrow9
231 Default: basic/x
232
233 size=float
234 Symbol size
235 When used with the size_column option this becomes the scale factor
236 Default: 5
237
238 size_column=name
239 Name of numeric column containing symbol size
240
241 rotation_column=name
242 Name of numeric column containing symbol rotation angle
243 Measured in degrees CCW from east
244
245 icon_area=string
246 Area/boundary symbol for legend
247 Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3,
248 basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3,
249 basic/diamond, basic/hexagon, basic/marker, basic/octagon,
250 basic/pin, basic/pin_dot, basic/point, basic/pushpin, basic/star,
251 basic/triangle, basic/x, demo/muchomurka, demo/smrk,
252 extra/4pt_star, extra/adcp, extra/airport, extra/alpha_flag,
253 extra/bridge, extra/dim_arrow, extra/dive_flag, extra/fiducial,
254 extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne,
255 extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon,
256 extra/ping, extra/ring, extra/simple_zia, extra/target, geol‐
257 ogy/circle_cross, geology/half-arrow_left, geol‐
258 ogy/half-arrow_right, geology/strike_box, geology/strike_circle,
259 geology/strike_cleavage, geology/strike_half-bowtie, geol‐
260 ogy/strike_line, geology/strike_parallel, geology/strike_triangle,
261 legend/area, legend/area_curved, legend/line, legend/line_crooked,
262 n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a,
263 n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3,
264 n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6,
265 n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a,
266 n_arrows/n_arrow8b, n_arrows/n_arrow9
267 Default: legend/area
268
269 icon_line=string
270 Line symbol for legend
271 Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3,
272 basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3,
273 basic/diamond, basic/hexagon, basic/marker, basic/octagon,
274 basic/pin, basic/pin_dot, basic/point, basic/pushpin, basic/star,
275 basic/triangle, basic/x, demo/muchomurka, demo/smrk,
276 extra/4pt_star, extra/adcp, extra/airport, extra/alpha_flag,
277 extra/bridge, extra/dim_arrow, extra/dive_flag, extra/fiducial,
278 extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne,
279 extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon,
280 extra/ping, extra/ring, extra/simple_zia, extra/target, geol‐
281 ogy/circle_cross, geology/half-arrow_left, geol‐
282 ogy/half-arrow_right, geology/strike_box, geology/strike_circle,
283 geology/strike_cleavage, geology/strike_half-bowtie, geol‐
284 ogy/strike_line, geology/strike_parallel, geology/strike_triangle,
285 legend/area, legend/area_curved, legend/line, legend/line_crooked,
286 n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a,
287 n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3,
288 n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6,
289 n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a,
290 n_arrows/n_arrow8b, n_arrows/n_arrow9
291 Default: legend/line
292
293 legend_label=string
294 Label to display after symbol in vector legend
295
296 label_layer=string
297 Layer number for labels (default: the given layer number)
298 Vector features can have category values in different layers. This
299 number determines which layer to use. When used with direct OGR
300 access this is the layer name.
301 Default: 1
302
303 attribute_column=name
304 Name of column to be displayed as a label
305
306 label_color=name
307 Label color
308 Either a standard color name or R:G:B triplet
309 Default: red
310
311 label_bgcolor=name
312 Label background color
313 Either a standard color name, R:G:B triplet, or "none"
314 Default: none
315
316 label_bcolor=name
317 Label border color
318 Either a standard color name, R:G:B triplet, or "none"
319 Default: none
320
321 label_size=integer
322 Label size (pixels)
323 Default: 8
324
325 font=string
326 Font name
327
328 encoding=string
329 Text encoding
330
331 xref=string
332 Label horizontal justification
333 Options: left, center, right
334 Default: left
335
336 yref=string
337 Label vertical justification
338 Options: top, center, bottom
339 Default: center
340
341 minreg=float
342 Minimum region size (average from height and width) when map is
343 displayed
344
345 maxreg=float
346 Maximum region size (average from height and width) when map is
347 displayed
348
350 d.vect displays vector maps in the active frame on the graphics moni‐
351 tor.
352
354 d.vect can simply be used typing d.vect map=vector_map. There are a
355 large variety of optional parameters which allow the user to specify
356 vector type, colors, data fields, SQL queries, label size and justifi‐
357 cation, etc.
358
359 By default d.vect areas are filled with fill_color and outlined with
360 color. Area outlines can be suppressed with
361 d.vect map=vector_map color=none
362 and areas can be made transparent with
363 d.vect map=vector_map fill_color=none
364
365 In order to display attributes in the map, attribute_column must be
366 specified.
367
368 Feature colors may be specified by v.colors in a form of color table or
369 in an attribute table column containing RRR:GGG:BBB values.
370
371 A table for a vector map might look like this:
372 db.select sql="select * from testisola"
373 cat|label|GRASSRGB
374 0|no data|255:255:255
375 90|FRASSILONGO|23:245:67
376 104|LEVICO|23:145:67
377 139|PERGINE VALSUGANA|223:45:237
378 168|SANT’ORSOLA|223:45:67
379 190|TENNA|123:45:67
380
381 To add the GRASSRGB color column, use v.db.addcolumn:
382 v.db.addcolumn map=testisola columns="GRASSRGB varchar(11)"
383
384 To add/change a color, use v.db.update:
385 v.db.update map=testisola column=GRASSRGB value="123:45:237" where="cat=139"
386
387 A much simpler method of color coding is by using the -c flag which
388 displays vector elements of like category number with a random color.
389
390 This module can use FreeType/TrueType fonts if they have already been
391 selected with d.font.
392
393 Parameter width is set by default to ’0’. XDRIVER specifies the precise
394 behaviour for non-zero line width, but drivers have some freedom as to
395 how zero-width lines are handled, so they can use the hardware’s "thin
396 line" drawing primitive, if it has one. A width of zero can potentially
397 result in significantly faster operation. On drivers where there is no
398 such thing as a "thin" line, the driver will use a sensible default
399 (which might not be the same as ’1’).
400
402 Spearfish examples:
403 # display roads with category numbers:
404 d.vect map=roads display=shape,cat label_color=green
405 # display randomly colorized soils map with attributes
406 d.vect -c map=soils attribute_column=label
407 # display randomly colorized selected vectors from soils map
408 d.vect -c map=soils where="label=’VBF’" display=shape attribute_column=label
409
410 3D points, 3D lines and 3D polygons colorized according to z height
411 (for 3D lines and polygons a z height is computed by a midpoint of
412 line/area bounding box):
413 g.region raster=elevation.10m
414 r.random input=elevation.10m n=5000 vector=random3d -d
415 d.mon start=x0
416 # display as black points
417 d.vect map=random3d
418 # display 3D points colorized according to z height
419 d.vect map=random3d zcolor=gyr
420 # 3D contour lines
421 r.contour input=elevation.10m output=contour20m step=20
422 d.vect map=contour20m zcolor=gyr
423 # generate 3D triangles
424 v.delaunay input=random3d output=random3d_del
425 # display 3D polygons colorized according to z height
426 d.vect map=random3d_del type=area zcolor=gyr
427
429 v.colors, d.erase, d.rast, v.colors, v.db.addcolumn, v.db.update
430
431 GRASS SQL interface
432
434 CERL
435 Radim Blazek, ITC-Irst, Trento, Italy
436 Support for color tables by Martin Landa, Czech Technical University in
437 Prague (8/2011)
438 and many other GRASS developers
439
441 Available at: d.vect source code (history)
442
443 Main index | Display index | Topics index | Keywords index | Graphical
444 index | Full index
445
446 © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
447
448
449
450GRASS 7.8.5 d.vect(1)