Skip to content

Multiple

Bernardo Niebuhr edited this page Mar 7, 2018 · 15 revisions

Single map or multiple maps?

LSMetrics may calculate metrics for a single or multiple maps at once. If you select "single", choose the map name in the list of maps (only maps in you current GRASS GIS mapset will appear) and select the metrics you wish to calculate.

Alternatively, you can run the selected metrics for multiple input maps in a single run, if they share some part of their names, using regular expressions. For instance, let's say you have the following three maps within your current mapset:

  • APA_Rio_Sao_Joao_tif
  • SP_RioClaro_North_tif
  • SP_RioClaro_South

In this case, as some of the maps have sequences of characters in common (e.g., "tif" between the first two, and "SP_RioClaro" between the last two maps), you can choose which ones to use as LSMetrics input using that. For running the calculations for a sequence of rasters with a string common pattern in raster file name, you must use the symbol "*" (asterisk). For example, in the white box of LSmetrics (Pattern):

  • if the file names' common pattern is all that starts with "SP", put: SP* (see the image below);
  • if you want to select all maps that contain "forest" in any part of the file name, put: *forest*;
  • if you want all maps that end with "SP", type: *SP ;
  • if you want to use all maps loaded in you current mapset as input, type: *.