g.gui.rlisetup.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <!-- meta page description: wxGUI RLi Setup -->
  2. <!-- meta page index: topic_gui|GUI -->
  3. <h2>DESCRIPTION</h2>
  4. The <b>g.gui.rlisetup</b> is a <em><a href="wxGUI.html">wxGUI</a></em>
  5. component which allows the user to create a configuration file
  6. for the analytical <em>r.li</em> modules. For a general introduction, see
  7. the <a href="r.li.html">r.li</a> overview.
  8. <br>
  9. The configurations are raster map independent, it means that you can use
  10. a file created on a raster map for analyze any other you have.
  11. <br>
  12. The program is completely interactive and uses a GUI to help you
  13. in your choices.
  14. <h3>Analysis methods</h3>
  15. Definition of creation of sampling area:
  16. <ul>
  17. <li> Whole map layer: use entire area selected above,</li>
  18. <li> Regions: select one to many subareas via mouse,</li>
  19. <li> Sample units: automated selection of sampling area (for details see below)
  20. <ul>
  21. <li> Random nonoverlapping,</li>
  22. <li> Systematic contiguous,</li>
  23. <li> Systematic noncontiguous,</li>
  24. <li> Stratified random,</li>
  25. <li> Centered over sites (vector points).</li>
  26. </ul>
  27. </li>
  28. <li> Moving window: rectangular or circular with size</li>
  29. <!-- only in GRASS GIS 6 version
  30. <li> Select areas from the overlaid vector map (for details see below)</li>
  31. -->
  32. </ul>
  33. <img src="g_gui_rlisetup_sample_areas.png" alt="Sampling area definitions">
  34. <p>
  35. Definition of region for analysis:
  36. <ul>
  37. <li> Whole map layer: entire map (current region),</li>
  38. <li> Keyboard setting: based on keyboard selection for region definition,</li>
  39. <li> Draw the sampling frame: based on interactive region selection via mouse.</li>
  40. </ul>
  41. <h3>Usage details</h3>
  42. The startup window shows your configuration files, you can:
  43. <p>
  44. <font color="red"><b>TODO: description below needs further updates</b></font>
  45. <p>
  46. <ol>
  47. <li><em><b>View/Edit</b></em> (Load a file) from the shown list: the
  48. configuration is shown in a small text editor window.
  49. <!-- only in GRASS GIS 6 version
  50. is printed using rectangles with differents colors (green for the
  51. raster map, red for the sample frame and blue for the sample areas),
  52. and other notes (disposition of sample areas etc).
  53. -->
  54. Configuration files are saved in the folder
  55. <tt>C:\Users\userxy\AppData\Roaming\GRASS8\r.li\</tt> (MS-Windows) or
  56. <tt>$HOME/.r.li/</tt> (GNU/Linux) (the file name can be
  57. defined by the user). The output or an analysis can either be a new raster
  58. map (in case of using a "moving window" analysis) or be an ASCII text file
  59. (when not performing a "moving window" analysis) containing the result.
  60. Such text file will be saved in the folder
  61. <tt>C:\Users\userxy\AppData\Roaming\GRASS8\r.li\output\</tt>
  62. (MS-Windows) or <tt>$HOME/.grass8/r.li/output/</tt> (GNU/Linux).
  63. <br>
  64. <!-- TODO: applies to all output or only ASCII output?? -->
  65. All dimensions are percentages of raster rows or columns.</li>
  66. <li><em><b>Create</b></em> a new configuration file: used for creating
  67. a new configuration file in an interactive way, in three steps:
  68. <ol>
  69. <li> Choose file name and maps to use for setting:
  70. <ul>
  71. <li> <em>Name for new configuration file</em>(required): the name
  72. of new configuration file</li>
  73. <li> <em>Raster map name to use to select areas</em> (required):
  74. the name of raster map used for selecting sampling areas</li>
  75. <li> <em>Vector map to overlay</em> (optional): name of a
  76. vector map used for selecting sampling areas</li>
  77. </ul>
  78. </li>
  79. <li> Set the sampling frame. The sample frame is a rectangular area
  80. which contains all the areas to analyze. It can be defined in three
  81. ways:
  82. <ul>
  83. <li><em>Whole map layer</em>: the sample frame is the whole map</li>
  84. <li><em>Keyboard setting</em>: the user enters the coordinates in
  85. cells of upper left corner of sampling frame and its length in
  86. rows and columns.</li>
  87. <li><em>Draw the sample frame</em>: the user draws the sample frame
  88. on map using mouse.</li>
  89. </ul>
  90. </li>
  91. <li> Set the sample areas. The sample areas are simply the areas to
  92. analyze. They can be defined in five ways (see the picture below):
  93. <ul>
  94. <li><em>Whole map layer</em>: the sample area is the whole sample
  95. frame</li>
  96. <li><em>Regions</em>: the user enters the number of areas and then
  97. draws them using mouse.</li>
  98. <li><em>Sample units</em>: they are areas of rectangular or circular
  99. shape. The user can define them using keyboard or mouse.
  100. <ul>
  101. <li>keyboard: the user define the shape of sample unists and
  102. their disposition:
  103. <ul>
  104. <li><em>Random non overlapping</em>: the user specifies
  105. the number of sample units and they are placed in a
  106. random way at runtime. It is guaranteed that the
  107. areas do not intersect themselves.</li>
  108. <li><em>Systematic contiguous</em>: the defined sample
  109. is placed covering the sample frame, side by side
  110. across rows.</li>
  111. <li><em>Systematic non contiguous</em>: the same as above,
  112. but here ever rectangle is spaced from another by
  113. a specified number of cells.</li>
  114. <li><em>Stratified random</em>: the sample frame is
  115. divided in <i>n</i> strats of rows and <i>m</i> strats of columns
  116. (<i>n</i> and <i>m</i> are given by user), then the specified
  117. number of sample areas are placed in a random way,
  118. one for every <i>m*n</i> areas defined by strats.</li>
  119. <li><em>Centered over sites</em>: the sample areas
  120. are placed into sample frame centering them on points
  121. in site file.</li>
  122. </ul>
  123. </li>
  124. <li>mouse: the user chooses the shape and then draws the
  125. specified number of sample areas on map.</li>
  126. </ul>
  127. </li>
  128. <li><em>Moving Window:</em> the user defines a rectangular or
  129. circular area, it is moved over all the raster increasing only
  130. of a cell for every move(in columns if possible, if not in rows).
  131. It produces a new raster containing the result of all analysis.</li>
  132. <li><em>Select areas from the overlaid vector map</em>:
  133. the sample areas are defined by the vector map selected above.
  134. For every cat in vector map, the procedure prompts the
  135. user if they want to include it as sample area.
  136. The resulting configuration file can be used only with the
  137. specified raster map, and the procedure can be used only if
  138. whole map layer is selected as sampling frame.</li>
  139. </ul>
  140. </li>
  141. </ol>
  142. <li><em><b>Remove a file</b></em> the selected file is deleted from the
  143. available configuration files.</li>
  144. <li><em><b>Help</b></em>: open this help text.</li>
  145. <li><em><b>Close</b></em> module window.</li>
  146. </ol>
  147. <h2>NOTES</h2>
  148. Configuration files are raster map independent because areas are saved using
  149. relative coordinates.
  150. <p>
  151. Screenshots of the wizard window frames:
  152. <center>
  153. <table border=0>
  154. <tr>
  155. <td align=center>
  156. &nbsp;<img src="g_gui_rlisetup_1.png" alt="g.gui.rlisetup: First frame of wizard for selecting existing configuration files or creating a new one">
  157. <br>
  158. <font size="-1">
  159. <i>g.gui.rlisetup: First frame of wizard for selecting <br>
  160. existing configuration files or creating a new one</i>
  161. </font>
  162. </td>
  163. <td align=center>
  164. &nbsp;<img src="g_gui_rlisetup_2.png" alt="g.gui.rlisetup: Frame for selecting maps">
  165. <br>
  166. <font size="-1">
  167. <i>g.gui.rlisetup: Frame for selecting maps</i>
  168. </font>
  169. </td>
  170. </tr>
  171. <tr>
  172. <td align=center>
  173. &nbsp;<img src="g_gui_rlisetup_3.png" alt="g.gui.rlisetup: Frame for inserting sampling areas">
  174. <br>
  175. <font size="-1">
  176. <i>g.gui.rlisetup: Frame for inserting sampling areas</i>
  177. </font>
  178. </td>
  179. <td align=center>
  180. &nbsp;<img src="g_gui_rlisetup_4.png" alt="g.gui.rlisetup: Frame for defining rectangular moving window">
  181. <br>
  182. <font size="-1">
  183. <i>g.gui.rlisetup: Frame for defining rectangular moving window</i>
  184. </font>
  185. </td>
  186. </tr>
  187. <tr>
  188. <td align=center>
  189. &nbsp;<img src="g_gui_rlisetup_5.png" alt="g.gui.rlisetup: Frame for defining circular moving window">
  190. <br>
  191. <font size="-1">
  192. <i>g.gui.rlisetup: Frame for defining circular moving window</i>
  193. </font>
  194. </td>
  195. <td align=center>
  196. &nbsp;<img src="g_gui_rlisetup_6.png" alt="g.gui.rlisetup: Frame for choosing the sampling frame with keyboard">
  197. <br>
  198. <font size="-1">
  199. <i>g.gui.rlisetup: Frame for choosing the sampling frame with keyboard</i>
  200. </font>
  201. </td>
  202. </tr>
  203. <tr>
  204. <td align=center>
  205. &nbsp;<img src="g_gui_rlisetup_7.png" alt="g.gui.rlisetup: Frame for drawing the sampling frame">
  206. <br>
  207. <font size="-1">
  208. <i>g.gui.rlisetup: Frame for drawing the sampling frame</i>
  209. </font>
  210. </td>
  211. <td align=center>
  212. &nbsp;<img src="g_gui_rlisetup_8.png" alt="g.gui.rlisetup: Summary frame before saving">
  213. <br>
  214. <font size="-1">
  215. <i>g.gui.rlisetup: Summary frame before saving</i>
  216. </font>
  217. </td>
  218. </tr>
  219. </table>
  220. </center>
  221. <h2>EXAMPLES</h2>
  222. <h3>Moving window analysis on full region</h3>
  223. <i>TODO: update examples to new g.gui.rlisetup dialog:</i>
  224. <p>
  225. Example for a 7x7 moving window analysis on full region, the output
  226. is a raster map:
  227. <p>
  228. Click on "New", then:
  229. <ul>
  230. <li> Configuration file name: "movwindow7"</li>
  231. <li> Raster map name to use to select areas: "forests"</li>
  232. </ul>
  233. 1. Setup sampling frame:
  234. <ul>
  235. <li> Define a sampling frame (region for analysis): "Whole map layer", then "OK"</li>
  236. </ul>
  237. 2. Setup sampling frame
  238. <ul>
  239. <li> Define sampling areas: "Moving window", then "OK"</li>
  240. <li> Then click on "Use keyboard to define moving window dimension"</li>
  241. </ul>
  242. Select type of shape:
  243. <ul>
  244. <li> [x] Rectangular</li>
  245. <li> Width size (in cells)?: "7"</li>
  246. <li> Height size (in cells)?: "7"</li>
  247. <li> Then "Save settings"</li>
  248. </ul>
  249. 3. Save settings: click on button
  250. <br>
  251. (4.) Close
  252. <p>
  253. Now an anaysis can be performed using one of the analytical modules, e.g.
  254. <div class="code"><pre>
  255. g.region raster=forests -p
  256. r.li.patchdensity input=forests conf=movwindow7 output=forests_p_dens7
  257. r.univar forests_p_dens7
  258. </pre></div>
  259. The result is the new raster map "forests_p_dens7" which shows (in this example)
  260. the patch density of the forest areas.
  261. <br>
  262. See the respective modules for further examples.
  263. <h3>Whole region analysis</h3>
  264. <!-- TODO: find a better example and briefly explain the meaning of result -->
  265. Example for a whole region analysis, the output is a text file:
  266. Click on "New", then:
  267. <ul>
  268. <li> Configuration file name: "whole_region"</li>
  269. <li> Raster map name to use to select areas: "lsat7_2000_40"</li>
  270. </ul>
  271. 1. Setup sampling frame:
  272. <ul>
  273. <li> Define a sampling frame (region for analysis): "Whole map layer", then "OK"</li>
  274. </ul>
  275. 2. Setup sampling frame
  276. <ul>
  277. <li> Define sampling areas: "Whole map layer", then "OK"</li>
  278. </ul>
  279. 3. Save settings: click on button
  280. <br>
  281. (4.) Close
  282. <p>
  283. Now an anaysis can be performed using one of the analytical modules, e.g.
  284. <div class="code"><pre>
  285. g.region raster=lsat7_2002_40 -p
  286. r.li.shannon input=lsat7_2000_40 conf=whole_region output=lsat7_2000_40_shannon
  287. </pre></div>
  288. The result is the new text file "forests_p_dens7" (stored in folder <tt>$HOME/.r.li/output/</tt>.
  289. <br>
  290. See the respective modules for further examples.
  291. <h2>REFERENCES</h2>
  292. McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern
  293. analysis program for quantifying landscape structure. USDA For. Serv.
  294. Gen. Tech. Rep. PNW-351. (<a href="http://treesearch.fs.fed.us/pubs/3064">PDF</a>)
  295. <h2>SEE ALSO</h2>
  296. <em>
  297. <a href="r.li.html">r.li</a> - package overview<br>
  298. <a href="r.li.daemon.html">r.li.daemon</a>
  299. </em>
  300. <p>
  301. <em>
  302. <a href="https://grass.osgeo.org/gdp/landscape/r_le_manual5.pdf">Old r.le suite manual</a> (1992)
  303. </em>
  304. <p>
  305. <em>
  306. <a href="wxGUI.html">wxGUI</a>,
  307. <a href="wxGUI.components.html">wxGUI components</a>
  308. </em>
  309. <h2>AUTHORS</h2>
  310. Luca Delucchi<br>
  311. Rewritten from <em>r.li.setup</em> by Claudio Porta and Lucio Davide Spano