1r.le.setup(1) Grass User's Manual r.le.setup(1)
2
3
4
6 r.le.setup - Interactive tool used to setup the sampling and analysis
7 framework that will be used by the other r.le programs.
8
10 raster
11
13 r.le.setup
14 r.le.setup help
15 r.le.setup map=name [vect=name] [--verbose] [--quiet]
16
17 Parameters:
18 map=name
19 Raster map to use to setup sampling
20
21 vect=name
22 Vector map to overlay
23
25 r.le.setup program is used to set up the sampling and analysis frame‐
26 work that will be used by the other r.le programs.
27
29 Full instructions can be found in the r.le manual (see "REFERENCES"
30 section below).
31
32 The first menu allows the user to define a rectangular sampling frame,
33 select how sampling will be done (regions, sampling units, moving win‐
34 dow), setup the limits for groups and classes, and change the color ta‐
35 ble. Use the left mouse button to make your choice.
36
37 Information about the structure of the landscape is obtained by over‐
38 laying a set of sampling areas on top of a specified part (the sampling
39 frame of a map layer, and then calculating specific structural measures
40 for the part of the map layer that corresponds to the area in each sam‐
41 pling area.
42
43 To setup a sampling frame click on SAMPLING FRAME in the main menu.
44 The program will ask "Will the sampling frame (total area within which
45 sampling units are distributed) be the whole map? (y/n) [y]" Just hit
46 a carriage return to accept the default, which is to use the whole map.
47 You do not need to setup a sampling frame if you want to use the whole
48 map, as this is the default. To setup a different sampling frame type
49 "n" in response to this question. Then use the mouse and a rubber band
50 box to outline a rectangular sampling frame on screen. This box will
51 be moved to the nearest row and column of the map. You will be asked
52 last whether you want to "Refresh the screen before choosing more set‐
53 up?" If you don't like the sampling frame you just setup, answer yes
54 to this question, then click on SAMPLING FRAME again to redo this part
55 of the setup. This sampling frame will be used in all subsequent setup
56 procedures unless you change it. You can change it at any time by sim‐
57 ply clicking on SAMPLING FRAME again.
58
59 A sampling area may be one of four things. First, it is possible to
60 treat the entire map layer as the one (and only) sampling area. Sec‐
61 ond, if the map layer can be divided into meaningful geographical
62 regions, then it is possible to treat the regions themselves as sam‐
63 pling areas. The third option is that the sampling areas may be sam‐
64 pling units of fixed shape and size (also called scale) that are placed
65 within the map layer as a whole. The fourth and final option is that
66 the sampling area may be moved systematically across the map as a mov‐
67 ing window.
68
69 If regions are to be used as the sampling areas , then the user can use
70 r.le.setup to draw regions or any existing map of regions can simply be
71 used directly. To draw regions and create a new regions map in
72 r.le.setup select "REGIONS" from the first r.le.setup menu, and the
73 user is asked to do the following:
74 1. "ENTER THE NEW REGION MAP NAME:". Only a new raster map name is
75 acceptable. The user can type LIST to find out the existing raster map
76 names in this location and mapset.
77 2. "PLEASE OUTLINE REGION # 1". The user should move the mouse cursor
78 into the graphic monitor window and use the mouse buttons as
79 instructed:
80 Left button: where am I.to display the current coordinates of the cur‐
81 sor.
82 Middle button: Mark start (next) point. to enter a vertex of the region
83 boundary.
84 Right button: Finish region-connect to 1st point to close the region
85 boundary by setting the last vertex to be equal to the first one.
86 3. A "REGION OPTIONS:" menu is displayed and the user should use the
87 mouse
88 to select one of
89 the options:
90 "DRAW MORE": repeat the above process and setup another region.
91 "START OVER": abandon the previous setup and start all over again.
92 "DONE-SAVE": save the regions outlined so far and exit this procedure.
93 "QUIT-NO SAVE": quit the procedure without saving the regions.
94
95
96 Once the "DONE-SAVE" option is selected, the new raster map of the sam‐
97 pling regions is generated. It is displayed on the monitor window for
98 several seconds, the monitor window is refreshed, the main menu is dis‐
99 played again, and the program is ready for other setup work. Note that
100 you cannot draw regions in areas outside the mask, if a mask is present
101 (see r.mask command).
102
103 The user can also use the GRASS r.digit or v.digit programs to digitize
104 circular or polygonal regions and to create a sampling regions map
105 without using r.le.setup. Or, as mention above, an existing raster map
106 can be used as a regions map.
107
108 If sampling units are to be used as the sampling areas (Fig. 2), then
109 choose "SAMPLING UNITS" from the first r.le.setup menu. The program
110 checks the r.le.para subdirectory for an existing "units" file from a
111 previous setup session and allows the user to rename this file (to save
112 it) before proceeding. The r.le.setup program will otherwise overwrite
113 the "units" file. Then the following choice is displayed followed by a
114 series of other choices:
115 Which do you want to do?
116 (1) Use the keyboard to enter sampling unit parameters
117 (2) Draw the sampling units with the mouse
118 Enter 1 or 2:
119
120
121 When sampling units are defined using the keyboard, the user inputs the
122 shape and size (scale) of the sampling units by specifying dimensions
123 in pixels using the keyboard. When sampling units are drawn with the
124 mouse, the user clicks the mouse to define the sampling units in the
125 GRASS monitor window, and then actually places the sampling units for
126 each scale onto the map. By placing the units with the mouse the user
127 can directly determine the method of sampling unit distribution as well
128 as the shape, size, and number of sampling units.
129
130 If the choice is made to define sampling units using the keyboard, the
131 following series of questions must be answered:
132 How many different SCALES do you want (1-15)?
133
134
135 The user is asked to specify the number of scales that will be used.
136 The r.le programs allow the user to simultaneously sample the same map
137 with the same measures using sampling areas of different sizes. Cur‐
138 rently there can be between 1 and 15 scales that can be sampled simul‐
139 taneously. Substantial output can be produced if many scales are used.
140
141 Sampling units must be placed spatially into the landscape. There are
142 five options for doing this :
143
144 Random nonoverlapping
145 Sampling units are placed in the landscape by randomly choosing numbers
146 that specify the location of the upper left corner of each sampling
147 unit, subject to the constraint that successive sampling units not
148 overlap other sampling units or the edge of the landscape, and that
149 they must be entirely within the area defined by the mask (see r.mask
150 command) if one exists.
151
152 Systematic contiguous
153 Sampling units are placed side by side across the rows. The user will
154 be able to enter a row and column to indicate where the upper left cor‐
155 ner of the systematic contiguous framework should be placed. Rows are
156 numbered from the top down beginning with row 1 of the sampling frame.
157 Columns are numbered from left to right, beginning with column 1 of the
158 sampling frame. A random starting location can be obtained by using a
159 standard random number table to choose the starting row and column.
160 The r.le.setup program does not avoid placing the set of sampling units
161 over areas outside the mask. The user will have to make sure that sam‐
162 pling units do not extend outside the mask by choosing a particular
163 starting row and column or by drawing a sampling frame before placing
164 the set of sampling units.
165
166 Systematic noncontiguous
167 The user must specify the starting row and column as in #2 above and
168 the amount of spacing (in pixels) between sampling units. Horizontal
169 and vertical spacing are identical. Sampling units are again placed
170 side by side (but spaced) across the rows. As in #2 the program does
171 not avoid placing sampling units outside the masked area; the user will
172 have to position the set of units to avoid areas outside the mask.
173
174 Stratified random
175 The strata are rectangular areas within which single sampling units are
176 randomly located. The user must first specify the starting row and
177 column as in #2 above. Then the user must specify the number of strata
178 in the horizontal and vertical directions. As in #2 the program does
179 not avoid placing sampling units outside the masked area; the user will
180 have to position the set of units to avoid areas outside the mask.
181
182 Centered over sites
183 The user must specify the name of a sitefile containing point loca‐
184 tions. A single sampling unit is placed with its center over each site
185 in the site file. This is a useful approach for determining the land‐
186 scape structure around points, such as around the location of wildlife
187 observations.
188
189 The user is prompted to enter a ratio that defines the shape of the
190 sampling units. Sampling units may have any rectangular shape, includ‐
191 ing square as a special case of rectangular. Rectangular shapes are
192 specified by entering the ratio of columns/rows (horizontal dimen‐
193 sion/vertical dimension) as a real number. For example, to obtain a
194 sampling unit 10 columns wide by 4 rows long specify the ratio as 2.5
195 (10/4).
196 Recommended maximum SIZE is m in x cell total area.
197 What size (in cells) for each sampling unit of scale n?
198
199
200 The user is then given the recommended maximum possible size for a sam‐
201 pling unit (in pixels) and asked to input the size of sampling units at
202 each scale. Sampling units can be of any size, but the maximum size is
203 the size of the landscape as a whole. All the sampling units, that
204 make up a single sampling scale, are the same size. After specifying
205 the size, the program determines the nearest actual number of rows and
206 columns, and hence size, that is closest to the requested size, given
207 the shape requested earlier.
208 The nearest size is x cells wide X y cells high = xy cells
209 Is this size OK? (y/n) [y]
210 Maximum NUMBER of units in scale n is p?
211 What NUMBER of sampling units do you want to try to use?
212
213
214 The maximum number of units that can be placed over the map, given the
215 shape and size of the units, is then given. The user can then choose
216 the number of sampling units to be used in the map layer. It may not
217 always be possible to choose the maximum number, depending upon the
218 shape of the sampling units. In the case of systematic contiguous and
219 noncontiguous, the program will indicate how many units will fit across
220 the columns and down the rows. The user can then specify a particular
221 layout (e.g., 6 units could be placed as 2 rows of 3 per row or as 3
222 rows of 2 per row).
223 Is this set of sampling units OK? (y/n) [y]
224
225
226 Finally, the set of sampling units is displayed on the screen (e.g.,
227 Fig. 1) and the user is asked whether it is acceptable. If the answer
228 is no, then the user is asked if the screen should be refreshed before
229 redisplaying the menu for "Methods of sampling unit distribution" so
230 that the user can try the sampling unit setup again.
231
232 The choice is made to define sampling units using the mouse, then the
233 following menu for use with the mouse is displayed:
234 Outline the standard sampling unit of scale n.
235 Left button: Check unit size
236 Middle button: Move cursor
237 Right button: Lower right corner of unit here
238
239
240 The user can then use the mouse and the rubber band box to outline the
241 standard sampling unit. Once it has been outlined, the number of col‐
242 umns and rows in the unit, the ratio of width/length and the size of
243 the unit, in cells, will be displayed. After this first unit is out‐
244 lined, then a new menu is displayed:
245 Outline more sampling units of scale n?
246 Left button: Exit
247 Middle button: Check unit position
248 Right button: Lower right corner of next unit here
249
250
251 The user can then place more units identical to the standard unit by
252 simply clicking the right mouse button where the lower right corner of
253 the unit should be placed. The rest of the rubber band box can be
254 ignored while placing additional units. The program is set up so that
255 units cannot be placed so they overlap one another, so they overlap the
256 area outside the mask, or so they overlap the edge of the sampling
257 frame. Warning messages are issued for all three of these errors and a
258 sampling unit is simply not placed.
259
260 Using this procedure a rectangular "window" or single sampling area is
261 moved systematically across the map to produce a new map (Fig. 2,3).
262 This sampling procedure can only be used with the measures that produce
263 a single value or with a single class or group when measures produce
264 distributions of values (Table 1). The first class or group specified
265 when defining class or group limits (section 2.3.2.) is used if distri‐
266 butional measures are chosen with the moving window sampling method.
267 In this case, the user should manually edit the r.le.para/recl_tb file
268 so that the desired group is listed as the first group in this file.
269
270 Sampling begins with the upper left corner of the window placed over
271 the upper left corner of the sampling frame. It is strongly recom‐
272 mended that the user read the section on the GRASS mask (section 2.2.2)
273 prior to setting up the moving window, as this mask can be used to
274 speed up the moving window operation. The value of the chosen measure
275 is calculated for the window area. This value is assigned to the loca‐
276 tion on the new map layer corresponding to the center pixel in the win‐
277 dow if the window has odd (e.g. 3 X 3) dimensions. The value is
278 assigned to the location on the new map layer corresponding to the
279 first pixel below and to the right of the center if the window has even
280 dimensions (e.g. 6 X 10). If this pixel has the value "0," which means
281 "no data" in GRASS, then this pixel is skipped and a value of "0" is
282 assigned to the corresponding location in the new map. The window is
283 then moved to the right (across the row) by one pixel, and the process
284 is repeated. At the end of the row, the window is moved down one
285 pixel, and then back across the row. This option produces a new map
286 layer, whose dimensions are smaller by approximately (m-1)/2 rows and
287 columns, where m is the number of rows or columns in the window.
288
289 If the "MOVE-WINDOW" option in the main menu is selected, first the
290 program checks for an existing "move_wind" file, in the r.le.para sub‐
291 directory, containing moving window specifications from a previous ses‐
292 sion. The user is given the option to avoid overwriting this file by
293 entering a new file name for the old "move_wind" file. Users should be
294 aware that moving window analyses are very slow, because a large number
295 of sampling units are, in effect, used. See the appendix on "Time
296 needed to complete analyses with the r.le programs" for some ideas
297 about how moving window size and sampling frame area affect the needed
298 time to complete the analyses.
299
300 The r.le programs r.le.dist and r.le.patch allow the attribute cate‐
301 gories in the input map to be reclassed into several attribute groups,
302 and reports the analysis results by each of these attribute groups. It
303 is necessary to setup group limits for all measures that say "by gp"
304 when typing "r.le.dist help" or "r.le.patch help" at the GRASS prompt.
305 The same reclassing can be done with the measurement indices (e.g.,
306 size), except that each "cohort" (class) of the reclassed indices is
307 called an index class instead of a group. It is also necessary to set‐
308 up class limits for all measures that say "by class" when typing
309 "r.le.dist help" or "r.le.patch help" at the GRASS prompt.
310
311 Group/class limits are setup by choosing "GROUP/CLASS LIMITS" from the
312 main menu upon starting r.le.setup, or you can create the files manu‐
313 ally using a text editor. The program checks for existing group/class
314 limit files in subdirectory r.le.para and allows the user to rename
315 these files prior to continuing. If the files are not renamed the pro‐
316 gram will overwrite them. The files are named recl_tb (attribute group
317 limits), size (size class limits), shape_PA (shape index class limits
318 for perimeter/area index), shape_CPA (shape index class limits for cor‐
319 rected perimeter/area index), shape_RCC (shape index class limits for
320 related circumscribing circle index), and from_to (for the r.le.dist
321 program distance methods m7-m9).
322
323 Attribute groups and index classes are defined in a different way. In
324 the r.le programs attribute groups are defined as in the following
325 example:
326 1, 3, 5, 7, 9 thru 21 = 1 (comment)
327 31 thru 50 = 2 (comment)
328 end
329
330
331 In this example, the existing categories 1, 3, 5, 7, {9, 10, ... 20,
332 21} are included in the new group 1, while {31, 32, 33, ..., 49, 50}
333 are included in the new group 2. The characters in bold are the "key
334 words" that are required in the definition. Each line is called one
335 "reclass rule".
336
337 The GRASS reclass convention is adopted here with a little modification
338 (see "r.reclass" command in the GRASS User's Manual). The difference
339 is that r.le only allows one rule for each group while the GRASS
340 r.reclass command allows more than one. The definition of "from" and
341 "to" groups is simply the extension of the GRASS reclass rule. The
342 advantage of using the GRASS reclass convention is that the user can
343 generate a permanent reclassed map, using GRASS programs, directly from
344 the r.le setup results.
345
346 The r.le measurement index classes are defined by the lower limits of
347 the classes, as in the following example:
348 0.0, 10.0, 50.0, 200.0, -999
349
350
351 This means:
352 if v >= 0.0 and v < 10.0 then v belongs to index class 1;
353 if v >= 10.0 and v < 50.0 then v belongs to index class 2;
354 if v >= 50.0 and v < 200.0 then v belongs to index class 3;
355 if v >= 200.0 then v belongs to index class 4;
356
357
358 where v is the calculated index value and -999 marks the end of the
359 index class definition. The measurement index can be the size index,
360 one of the three shape indices, or one of the three distance indices.
361 The program is currently designed to allow no more than 25 attribute
362 groups, 25 size classes, 25 shape index classes, and 25 distance index
363 classes. As an alternative, the user may want to permanently group
364 certain attributes prior to entering the r.le programs. For example,
365 the user may want to group attributes 1-10, in a map whose attributes
366 are ages, into a single attribute representing young patches. The user
367 can do this using the GRASS r.reclass and r.resample commands, which
368 will create a new map layer that can then be analyzed directly (without
369 setting up group limits) with the r.le programs.
370
372 Baker, W.L. and Y. Cai. 1992. The r.le programs for multiscale analysis
373 of landscape structure using the GRASS geographical information system.
374 Landscape Ecology 7(4):291-302.
375
376 The r.le manual: Quantitative analysis of landscape structures (GRASS
377 5; 2001)
378
380 r.le.patch, r.le.pixel, r.le.trace
381
383 William L. Baker Department of Geography and Recreation University of
384 Wyoming Laramie, Wyoming 82071 U.S.A.
385
386 Last changed: $Date: 2006-10-19 06:22:45 +0200 (Thu, 19 Oct 2006) $
387
388 Full index
389
390 © 2003-2008 GRASS Development Team
391
392
393
394GRASS 6.3.0 r.le.setup(1)