d.vect.thematic.html 3.6 KB

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