wxGUI.modules.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <!-- meta page description: wxGUI Module dialogs -->
  2. <!-- meta page index: wxGUI -->
  3. <h2>DESCRIPTION</h2>
  4. GRASS GIS functionality is organized into modules, which are standalone programs
  5. with defined interface. Their graphical user interface (GUI) is a dialog
  6. with several tabs which organize module parameters into groups.
  7. <p>
  8. Each parameter can have different type of input fields,
  9. for example text entry or drop-down list.
  10. Flags are represented as checkboxes. The parameter (or flag) name
  11. is visible on the right side of each input field
  12. so that it is simple to understand how the module dialog
  13. relates to the command representation which is used in the manuals and tutorials.
  14. The commands can be used to call the module in the command line, Shell scripts
  15. or, with a slight modification, in a Python script.
  16. <center>
  17. <img src="wxGUI_modules_parameters.png" border="0" alt="r.neighbors dialog">
  18. </center>
  19. <h3>Tabs</h3>
  20. Module parameters and flags are organized in tabs. Their names can depend on a module,
  21. however every module has <i>Command output</i> tab where the progress can be observed,
  22. and the module output including text results or warnings are printed.
  23. The last <i>Manual</i> tab contains description of module's parameters
  24. and examples. The same information can be found in the online manual as well.
  25. <p>
  26. The style of the tabs can be changed through <i>GUI settings</i> -
  27. <i>Appearance</i> - <i>Module dialog style</i>. Note that the style appearance
  28. depends on the platform and some styles might be more suitable
  29. for different platforms.
  30. <center>
  31. <img src="wxGUI_modules_style_left.png" border="0" alt="dialog style left">
  32. <img src="wxGUI_modules_style_top.png" border="0" alt="dialog style top">
  33. <br>
  34. Figure: Example of style "left" and "top" on Ubuntu.
  35. </center>
  36. <h3>Flags</h3>
  37. Module flags are represented as checkboxes with description. There
  38. are three special flags - <i>overwrite</i>, <i>verbose</i> and <i>quiet</i>.
  39. Flags <i>verbose</i> and <i>quiet</i> set the level of verbosity of the module
  40. (how detailed the messages should be).
  41. <center>
  42. <img src="wxGUI_modules_flags.png" border="0" alt="dialog flags">
  43. <br>
  44. </center>
  45. <p>
  46. Modules which output a new map or a new file have the flag <i>overwrite</i>
  47. which must be used when the specified output map or file is already present.
  48. If the map or file of the specified name already exist and <i>overwrite</i>
  49. flag is not used, an error message appears:
  50. <pre>
  51. r.slope.aspect elevation=elevation slope=slope
  52. ERROR: option &lt;slope&gt;: &lt;slope&gt; exists. To overwrite, use the --overwrite flag
  53. </pre>
  54. If using the command instead of GUI, these flags are unlike other flags
  55. prefixed with double dash:
  56. <div class="code"><pre>
  57. r.slope.aspect elevation=elevation slope=slope --overwrite --quiet
  58. </pre></div>
  59. <h3>Current working directory</h3>
  60. Certain modules require a file as input or output.
  61. Either the full path to the file needs to be specified
  62. or a path relative
  63. to the current working directory is enough, for example only the name of the file.
  64. <b>Current working directory</b> is a directory where GRASS would look
  65. for or output files to if the full path is not specified.
  66. By default working directory is user's home folder.
  67. It can be changed in wxGUI menu
  68. <i>Settings</i> - <i>GRASS working environment</i> -
  69. <i>Change working directory</i>,
  70. or by typing <tt>cd</tt> and pressing Enter in the wxGUI Command console.
  71. If the working directory is changed to a directory where the input files are,
  72. then it is enough to specify just the name of the file instead of the full path.
  73. <p>
  74. This applies to external files such as text files or GeoTiff files.
  75. This does not apply to raster maps, vector maps
  76. and other geospatial data stored in GRASS database
  77. which do not need any path to be specified.
  78. <h3>Special widgets</h3>
  79. For raster, vector or 3D raster input, there is a special
  80. widget which after clicking on the arrow to the right pops up
  81. a list of existing maps from different mapsets.
  82. Selecting a map from the popup list will add it to the entry field.
  83. In case multiple maps can be specified (denoted by <i>[multiple]</i> label),
  84. selecting a map from the popup list will append the map names with
  85. comma in between.
  86. <center>
  87. <img src="wxGUI_modules_widget_selection.png" border="0" alt="widget for selecting maps">
  88. <br>
  89. </center>
  90. <p>
  91. If the input file is supposed to be a text file
  92. (for example color rules in r.colors),
  93. it is possible to type the text in the provided box directly instead
  94. of creating a new file in a text editor and saving it.
  95. A temporary file is created in this case. By pressing the <i>Save as</i>
  96. button, the content of the box is then saved into user specified file,
  97. so that user's workflow can be reproduced later. With <i>Load</i>
  98. button we can display the content of selected file and edit it
  99. directly in the box.
  100. <center>
  101. <img src="wxGUI_modules_widget_file1.png" border="0" alt="widget for input files">
  102. <img src="wxGUI_modules_widget_file2.png" border="0" alt="widget for input files">
  103. <br>
  104. <p> Figure: In the first image, user specified a full path to a file.
  105. In the second image, user typed color rules conveniently
  106. into the box below, however the rules will not be stored permanently.
  107. </center>
  108. <h2>NOTES</h2>
  109. Dialogs are generated automatically based on module interface defined using <a href="g.parser.html">g.parser</a>.
  110. Command line interface can be obtained when running the module with a <i>--help</i>
  111. flag. The options and flags are the same as in the module GUI.
  112. <pre>
  113. r.neighbors --help
  114. Description:
  115. Makes each cell category value a function of the category
  116. values assigned to the cells around it, and stores new cell
  117. values in an output raster map layer.
  118. Keywords:
  119. raster, algebra, statistics, aggregation, neighbor, focal
  120. statistics, filter
  121. Usage:
  122. r.neighbors [-ac] input=name [selection=name]
  123. output=name[,name,...]
  124. [method=string[,string,...]] [size=value] [title=phrase]
  125. [weight=name]
  126. [gauss=value] [quantile=value[,value,...]] [--overwrite]
  127. [--help]
  128. [--verbose] [--quiet] [--ui]
  129. Flags:
  130. -a Do not align output with the input
  131. -c Use circular neighborhood
  132. --o Allow output files to overwrite existing files
  133. --h Print usage summary
  134. --v Verbose module output
  135. --q Quiet module output
  136. --ui Force launching GUI dialog
  137. Parameters:
  138. input Name of input raster map
  139. selection Name of an input raster map to select the
  140. cells which should be processed
  141. output Name for output raster map
  142. method Neighborhood operation
  143. options:
  144. average,median,mode,minimum,maximum,range,stddev,sum,
  145. count,variance,diversity,interspersion,quart1,quart3,
  146. perc90,quantile
  147. default: average
  148. size Neighborhood size
  149. default: 3
  150. title Title for output raster map
  151. weight Text file containing weights
  152. gauss Sigma (in cells) for Gaussian filter
  153. quantile Quantile to calculate for method=quantile
  154. options: 0.0-1.0
  155. </pre>
  156. <h2>SEE ALSO</h2>
  157. <em>
  158. <a href="wxGUI.html">wxGUI</a><br>
  159. <a href="wxGUI.components.html">wxGUI components</a>
  160. </em>
  161. <h2>AUTHORS</h2>
  162. GRASS Development Team<br>
  163. manual by Anna Petrasova, OSGeoREL, Faculty of Civil Engineering, Czech Technical University in Prague<br>
  164. Vaclav Petras, OSGeoREL, Faculty of Civil Engineering, Czech Technical University in Prague