| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>d.vect.thematic</em> draws thematic choropleth vector maps based |
| 4 |
on an attribute column or an expression involving several columns. |
| 5 |
It takes a list of class <b>breaks</b> (excluding the minimum and maximum |
| 6 |
values) and a list of <b>colors</b> to apply to the classes (has to be the |
| 7 |
number of class breaks + 1). |
| 8 |
<p> |
| 9 |
Instead of a list of class breaks, the user can also chose a |
| 10 |
classification <b>algorithm</b> and a number of classes |
| 11 |
(<b>nbclasses</b>). See the |
| 12 |
<em><a href="v.class.html">v.class</a></em> for more information on |
| 13 |
these different algorithms. |
| 14 |
|
| 15 |
<h2>NOTES</h2> |
| 16 |
|
| 17 |
The <b>-l</b> flag instructs the module to print legend information |
| 18 |
in vector legend format as described in <em><a href="d.legend.vect.html">d.legend.vect</a></em> |
| 19 |
to standard output for further use in graphical software. |
| 20 |
When combined with the verbose flag, the legend information will |
| 21 |
be extended with some additional statistical information. If the |
| 22 |
<b>-n</b> flag is set, the module will only print the legend |
| 23 |
information without drawing the map. |
| 24 |
|
| 25 |
<p>Option <b>legendfile</b>, is deprecated, instead |
| 26 |
use the GRASS_LEGEND_FILE environmental variable |
| 27 |
(see <em><a href="d.legend.vect.html">d.legend.vect</a></em>) |
| 28 |
to save legend into a file. |
| 29 |
Flag <b>-e</b> is deprecated, instead use verbose flag. |
| 30 |
|
| 31 |
<h2>EXAMPLES</h2> |
| 32 |
|
| 33 |
<h3>Thematic map with classes</h3> |
| 34 |
|
| 35 |
<div class="code"><pre> |
| 36 |
d.vect.thematic -l map=communes3 column=pop \ |
| 37 |
breaks=111393.250000,222785.500000,334177.750000 \ |
| 38 |
colors="255:0:0,0:255:0,0:0:255,0,0,0" |
| 39 |
</pre></div> |
| 40 |
|
| 41 |
<h3>Thematic map with calculated class breaks</h3> |
| 42 |
|
| 43 |
The following example uses a calculated attribute (<code>density = |
| 44 |
pop/area</code>) and the standard deviation algorithm to calculate class |
| 45 |
breaks for 5 classes: |
| 46 |
|
| 47 |
<div class="code"><pre> |
| 48 |
d.vect.thematic -l map=communes2 column=pop/area algorithm=std \ |
| 49 |
nbclasses=5 colors="0:0:255,50:100:255,255:100:50,255:0:0,156:0:0" |
| 50 |
</pre></div> |
| 51 |
|
| 52 |
<h3>Thematic map with legend</h3> |
| 53 |
|
| 54 |
Example for the North Carolina sample dataset, colorizing basin polygons by |
| 55 |
average elevation and displaying school capacity: |
| 56 |
|
| 57 |
<div class="code"><pre> |
| 58 |
# create watersheds from elevation map |
| 59 |
g.region raster=elevation |
| 60 |
r.watershed elevation=elevation threshold=10000 basin=basins_10k |
| 61 |
|
| 62 |
# convert raster to vector |
| 63 |
r.to.vect input=basins_10k output=basins_10k type=area column=basin_num |
| 64 |
|
| 65 |
# upload raster statistics to each polygon in vector map |
| 66 |
v.rast.stats map=basins_10k raster=elevation column_prefix=elev |
| 67 |
|
| 68 |
# open a graphical display |
| 69 |
d.mon wx0 |
| 70 |
|
| 71 |
# draw thematic polygons and specify legend title |
| 72 |
d.vect.thematic map=basins_10k column=elev_average algorithm=int \ |
| 73 |
nclasses=5 colors=0:195:176,39:255:0,251:253:0,242:127:11,193:126:60 \ |
| 74 |
legend_title="Average elevation (m)" |
| 75 |
|
| 76 |
# draw thematic points and specify legend title |
| 77 |
d.vect.thematic map=schools_wake@PERMANENT column=CORECAPACI algorithm=std \ |
| 78 |
nclasses=3 colors=149:203:255,45:143:240,0:81:161 icon=basic/circle size=15 \ |
| 79 |
legend_title="School capacity" |
| 80 |
|
| 81 |
# and finally draw legend |
| 82 |
d.legend.vect -b at=2,80 font=Sans symbol_size=25 |
| 83 |
</pre></div> |
| 84 |
|
| 85 |
<center> |
| 86 |
<a href="d_vect_thematic.png"> |
| 87 |
<img src="d_vect_thematic.png" alt="d_vect_thematic example" width="600" height="377"></a> |
| 88 |
<br> |
| 89 |
<i>Thematic map of average elevation and school capacity</i> |
| 90 |
</center> |
| 91 |
|
| 92 |
<h2>SEE ALSO</h2> |
| 93 |
|
| 94 |
<em> |
| 95 |
<a href="v.class.html">v.class</a>, |
| 96 |
<a href="d.legend.vect.html">d.legend.vect</a>, |
| 97 |
<a href="d.vect.html">d.vect</a>, |
| 98 |
<a href="d.graph.html">d.graph</a>, |
| 99 |
<a href="v.univar.html">v.univar</a> |
| 100 |
</em> |
| 101 |
|
| 102 |
<p> |
| 103 |
Check also Python module from |
| 104 |
AddOns: <em><a href="https://grass.osgeo.org/grass8/manuals/addons/d.vect.thematic2.html">d.vect.thematic2</a></em> |
| 105 |
|
| 106 |
<h2>AUTHOR</h2> |
| 107 |
|
| 108 |
Moritz Lennert |