wxGUI.rlisetup(1grass)

πŸ’… wxGUI RLi Setup ✨

okay so hi bestie 🫢 you just opened wxGUI.rlisetup(1grass) and honestly? iconic. this is the GRASS User's Manual page for the RLi Setup GUI, and by the end of this you're gonna be building sampling configs like it's nothing. no cap.


🌸 DESCRIPTION 🌸

g.gui.rlisetup is a wxGUI component and what it does is let you create a configuration file for the analytical r.li modules. if you want the whole big-picture intro, go read the r.li overview first, bestie.

here's the thing that makes these configs kinda slay: they're raster map independent. like, literally. you can make a file using one raster map and then use that exact same file to analyze any other raster map you want. it does not care. it's giving main character energy πŸ’…

and the whole program? completely interactive. it's a GUI helping you make your choices, so no scary command line required (unless you want one, which, valid).

πŸ” Analysis methods

Definition of creation of sampling area:

  • Whole map layer: use the entire area selected above
  • Regions: select one to many subareas with your mouse πŸ–±οΈ
  • Sample units: automated selection of the sampling area (deets below, keep scrolling)
    • Random nonoverlapping
    • Systematic contiguous
    • Systematic noncontiguous
    • Stratified random
    • Centered over sites (vector points)
  • Moving window: rectangular or circular, with a size

Definition of region for analysis:

  • Whole map layer: the entire map (current region)
  • Keyboard setting: based on keyboard selection for region definition
  • Draw the sampling frame: based on interactive region selection via mouse

πŸŽ€ Usage details πŸŽ€

the startup window shows you your configuration files, and from there you can:

TODO: description below needs further updates
  1. View/Edit β€” load a file from the list shown. the configuration pops open in a little text editor window. configuration files get saved in the folder C:\Users\userxy\AppData\Roaming\GRASS8\r.li\ (MS-Windows) or $HOME/.r.li/ (GNU/Linux), and yes the file name is yours to define, go off πŸ‘‘. the output of an analysis can either be a new raster map (that's when you're doing a "moving window" analysis) or an ASCII text file (when you're not doing a "moving window" analysis) holding the result. that text file gets saved in the folder C:\Users\userxy\AppData\Roaming\GRASS8\r.li\output\ (MS-Windows) or $HOME/.grass8/r.li/output/ (GNU/Linux). also!! all dimensions are percentages of raster rows or columns. remember that.
  2. Create a new configuration file β€” this is the interactive way to make a fresh config file, in three steps:
    1. Choose file name and maps to use for setting:
      • Name for new configuration file (required): the name of the new configuration file
      • Raster map name to use to select areas (required): the name of the raster map used for selecting sampling areas
      • Vector map to overlay (optional): the name of a vector map used for selecting sampling areas
    2. Set the sampling frame. the sample frame is a rectangular area that contains all the areas you want to analyze. you can define it three ways:
      • Whole map layer: the sample frame is the whole map
      • Keyboard setting: you type in the coordinates in cells of the upper left corner of the sampling frame, plus its length in rows and columns
      • Draw the sample frame: you draw the sample frame on the map with your mouse
    3. Set the sample areas. the sample areas are simply the areas to analyze. you can define them five ways (check the picture below):
      • Whole map layer: the sample area is the whole sample frame
      • Regions: you enter the number of areas and then draw them with your mouse
      • Sample units: these are areas of rectangular or circular shape. you can define them with keyboard or mouse.
        • keyboard: you define the shape of the sample units and their disposition:
          • Random non overlapping: you specify the number of sample units, and they get placed in a random way at runtime. it is guaranteed that the areas do not intersect themselves 🫢
          • Systematic contiguous: the defined sample is placed covering the sample frame, side by side across rows
          • Systematic non contiguous: same as above, except here every rectangle is spaced from another by a specified number of cells
          • Stratified random: the sample frame is divided in n strats of rows and m strats of columns (n and m are given by you), then the specified number of sample areas is placed in a random way, one for every m*n areas defined by strats
          • Centered over sites: the sample areas are placed into the sample frame, centering them on points in the site file
        • mouse: you choose the shape and then draw the specified number of sample areas on the map
      • Moving Window: you define a rectangular or circular area, and it gets moved over all the raster, increasing only by a cell for every move (in columns if possible, if not in rows). it produces a new raster containing the result of all the analysis. periodt.
      • Select areas from the overlaid vector map: the sample areas are defined by the vector map selected above. for every cat in the vector map, the procedure prompts you asking if you want to include it as a sample area. heads up: the resulting configuration file can be used only with the specified raster map, and this procedure can be used only if whole map layer is selected as the sampling frame. iykyk.
  3. Remove a file β€” the selected file is deleted from the available configuration files. bye bestie πŸ‘‹
  4. Help: open this help text.
  5. Close module window.

πŸ’– NOTES πŸ’–

configuration files are raster map independent because areas are saved using relative coordinates. that's the whole magic trick ✨

screenshots of the wizard window frames:

  • g.gui.rlisetup: first frame of wizard for selecting existing configuration files or creating a new one
  • g.gui.rlisetup: frame for selecting maps
  • g.gui.rlisetup: frame for inserting sampling areas
  • g.gui.rlisetup: frame for defining rectangular moving window
  • g.gui.rlisetup: frame for defining circular moving window
  • g.gui.rlisetup: frame for choosing the sampling frame with keyboard
  • g.gui.rlisetup: frame for drawing the sampling frame
  • g.gui.rlisetup: summary frame before saving

🌈 EXAMPLES 🌈

🌟 Moving window analysis on full region

TODO: update examples to new g.gui.rlisetup dialog:

example for a 7x7 moving window analysis on full region β€” the output is a raster map. click on "New", then:

  • Configuration file name: "movwindow7"
  • Raster map name to use to select areas: "forests"
  1. Setup sampling frame:
    • Define a sampling frame (region for analysis): "Whole map layer", then "OK"
  2. Setup sampling frame
    • Define sampling areas: "Moving window", then "OK"
    • Then click on "Use keyboard to define moving window dimension"

select type of shape:

  • [x] Rectangular
  • Width size (in cells)?: "7"
  • Height size (in cells)?: "7"
  • Then "Save settings"
  1. Save settings: click on button
  2. (4.) Close

now an analysis can be performed using one of the analytical modules, e.g.

g.region raster=forests -p
r.li.patchdensity input=forests conf=movwindow7 output=forests_p_dens7
r.univar forests_p_dens7

the result is the new raster map "forests_p_dens7" which shows (in this example) the patch density of the forest areas 🌳

see the respective modules for further examples.

🌟 Whole region analysis

example for a whole region analysis β€” the output is a text file. click on "New", then:

  • Configuration file name: "whole_region"
  • Raster map name to use to select areas: "lsat7_2000_40"
  1. Setup sampling frame:
    • Define a sampling frame (region for analysis): "Whole map layer", then "OK"
  2. Setup sampling frame
    • Define sampling areas: "Whole map layer", then "OK"
  3. Save settings: click on button
  4. (4.) Close

now an analysis can be performed using one of the analytical modules, e.g.

g.region raster=lsat7_2002_40 -p
r.li.shannon input=lsat7_2000_40 conf=whole_region output=lsat7_2000_40_shannon

the result is the new text file "forests_p_dens7" (stored in folder $HOME/.r.li/output/).

see the respective modules for further examples.


πŸ¦‹ REFERENCES πŸ¦‹

McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. USDA For. Serv. Gen. Tech. Rep. PNW-351. (PDF)


πŸ‘€ SEE ALSO πŸ‘€

  • r.li (package overview), r.li.daemon
  • Old r.le suite manual (1992)
  • wxGUI, wxGUI components

πŸ‘‘ AUTHORS πŸ‘‘

  • Luca Delucchi
  • Rewritten from r.li.setup by Claudio Porta and Lucio Davide Spano

⭐ SOURCE CODE ⭐

Available at: wxGUI RLi Setup source code (history)

Accessed: Tuesday Sep 08 11:56:21 2026

Main index | GUI index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


okay that's the whole thing bestie, you ate it up πŸ“πŸ’œ this was the GRASS 8.5.0 version of wxGUI.rlisetup(1grass) β€” go forth and configure, mwah πŸ’‹

πŸ“¦ where this page comes from