Debian Codegraph @

gui/wxpython/rlisetup/g.gui.rlisetup.html

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