瀏覽代碼

wxGUI/gmodeler: major improvements of the manual by Ludka Furtkevicova
small images replaced by original (file size optimized by svn-image.sh)
scaling done by <img width=>


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68046 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 9 年之前
父節點
當前提交
9fc5f5553c
共有 43 個文件被更改,包括 192 次插入28 次删除
  1. 192 28
      gui/wxpython/gmodeler/g.gui.gmodeler.html
  2. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_avg_auto.png
  3. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_avg_map.png
  4. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_avg_run.png
  5. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_comment.png
  6. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_db.png
  7. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_dlg_module.png
  8. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_frame1.png
  9. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_frame2.png
  10. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_frame3.png
  11. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_intermediate_data.png
  12. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_items.png
  13. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_loop.png
  14. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_loop_dlg.png
  15. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_loop_final.png
  16. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_lower_toolbar.png
  17. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_model_avg.png
  18. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_model_classification.png
  19. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_model_landslides.png
  20. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_model_properties.png
  21. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_model_usle.png
  22. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modis_1.png
  23. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modis_1o.png
  24. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modis_2.png
  25. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modis_2o.png
  26. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modis_3.png
  27. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modis_3o.png
  28. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modul.png
  29. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_modulex.png
  30. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_parameter.png
  31. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_python.png
  32. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_python_code.png
  33. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_python_code_result.png
  34. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_raster.png
  35. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_raster3d.png
  36. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_relation.png
  37. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_toolbar.png
  38. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_variables.png
  39. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_variables_raster.png
  40. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_variables_run.png
  41. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_vector.png
  42. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_zc.png
  43. 二進制
      gui/wxpython/gmodeler/g_gui_gmodeler_zc_items.png

+ 192 - 28
gui/wxpython/gmodeler/g.gui.gmodeler.html

@@ -72,7 +72,6 @@ color="red">16</font>) Show manual and last of them is button
 
 <p>
 <center>
-<br>
 <img src="g_gui_gmodeler_toolbar.png">
 <br>
 <i>Figure: Components of Graphical Modeler menu toolbar.</i>
@@ -88,10 +87,10 @@ shows all the steps of running GRASS modeler modules. In case of some
 errors in calculation process, it is written at that place.
 
 <center>
+<a href="g_gui_gmodeler_lower_toolbar.png"><img src="g_gui_gmodeler_lower_toolbar.png" width="700"></a>
 <br>
-<img src="g_gui_gmodeler_lower_toolbar.png">
-<br>
-<i>Figure: Lower Graphical Modeler menu toolbar.</i>
+<i>Figure: Lower Graphical Modeler menu toolbar.
+</i>
 </center>
 
 <h3>Components of models</h3>
@@ -104,30 +103,32 @@ database tables, etc. Type of data is clear distinguishable in model by color.
 Different model elements are shown on the figures below.
 
 <ul>
-  <li> (<font size="2" color="red">A</font>) raster data: <img src="g_gui_gmodeler_mraster.png" alt="raster" style="margin: 0px 0px -5px 0px">
-  <li> (<font size="2" color="red">B</font>) relation: <img src="g_gui_gmodeler_mrelation.png" alt="relation" style="margin: 10px 0px 0px 0px">
-  <li> (<font size="2" color="red">C</font>) GRASS module: <img src="g_gui_gmodeler_mmodule.png" alt="module" style="margin: 0px 0px -5px 0px">
-  <li> (<font size="2" color="red">D</font>) loop: <img src="g_gui_gmodeler_mloop.png" alt="loop" style="margin: 15px 0px -5px 0px">
-  <li> (<font size="2" color="red">E</font>) database table: <img src="g_gui_gmodeler_mdb.png" alt="db" style="margin: 10px 0px -5px 0px">
-  <li> (<font size="2" color="red">F</font>) 3D raster data: <img src="g_gui_gmodeler_mraster3d.png" alt="raster3D" style="margin: 10px 0px -5px 0px"> 
-  <li> (<font size="2" color="red">G</font>) vector data: <img src="g_gui_gmodeler_mvector.png" alt="vector" style="margin: 10px 0px -5px 0px">  
-  <li> (<font size="2" color="red">H</font>) disabled GRASS module: <img src="g_gui_gmodeler_mmodulex.png" alt="module" style="margin: 10px 0px -5px 0px"> 
-  <li> (<font size="2" color="red">I</font>) comment: <img src="g_gui_gmodeler_mcomment.png" alt="comment" style="margin: 10px 0px -5px 0px">  
+  <li> (<font size="2" color="red">A</font>) raster data: <img src="g_gui_gmodeler_raster.png" alt="raster" style="margin: 0px 0px -5px 0px">
+  <li> (<font size="2" color="red">B</font>) relation: <img src="g_gui_gmodeler_relation.png" alt="relation" style="margin: 10px 0px 0px 0px">
+  <li> (<font size="2" color="red">C</font>) GRASS module: <img src="g_gui_gmodeler_modul.png" alt="module" style="margin: 0px 0px -5px 0px">
+  <li> (<font size="2" color="red">D</font>) loop: <img src="g_gui_gmodeler_loop.png" alt="loop" style="margin: 15px 0px -5px 0px">
+  <li> (<font size="2" color="red">E</font>) database table: <img src="g_gui_gmodeler_db.png" alt="db" style="margin: 10px 0px -5px 0px">
+  <li> (<font size="2" color="red">F</font>) 3D raster data: <img src="g_gui_gmodeler_raster3d.png" alt="raster3D" style="margin: 10px 0px -5px 0px"> 
+  <li> (<font size="2" color="red">G</font>) vector data: <img src="g_gui_gmodeler_vector.png" alt="vector" style="margin: 10px 0px -5px 0px">  
+  <li> (<font size="2" color="red">H</font>) disabled GRASS module: <img src="g_gui_gmodeler_modulex.png" alt="module" style="margin: 10px 0px -5px 0px"> 
+  <li> (<font size="2" color="red">I</font>) comment: <img src="g_gui_gmodeler_comment.png" alt="comment" style="margin: 10px 0px -5px 0px">  
 </ul> 
 
 <center>
-<img src="g_gui_gmodeler_frame1.png">
+<a href="g_gui_gmodeler_model_classification.png">
+<img src="g_gui_gmodeler_model_classification.png" width="500"></a>
 <br>
 <i>Figure: A model to perform unsupervised classification using MLC
-(<a href="i.maxlik.html">i.maxlik</a>) and SMAP
-(<a href="i.smap.html">i.smap</a>).</i>
+(<a href="i.maxlik.html">i.maxlik</a>) and SMAP (<a href="i.smap.html">i.smap</a>).
+</i>
 </center>
 
 <p>
 Another example:
 
 <center>
-<img src="g_gui_gmodeler_frame2.png">
+<a href="g_gui_gmodeler_model_usle.png">
+<img src="g_gui_gmodeler_model_usle.png" width="600"></a>
 <br>
 <i>Figure: A model to perform estimation of average annual soil loss
 caused by sheet and rill erosion using The Universal Soil Loss
@@ -138,8 +139,8 @@ Equation.</i>
 Example as part of landslide prediction process:
 
 <center>
-<br>
-<img src="g_gui_gmodeler_frame3.png">
+<a href="g_gui_gmodeler_model_landslides.png">
+<img src="g_gui_gmodeler_model_landslides.png" width="600"></a>
 <br>
 <i>Figure: A model to perform creation of parametric maps used by geologists 
 to predict landlides in area of interest.</i>
@@ -190,8 +191,10 @@ module name is inserted, after <i>Enter</i> button pressing, module
 dialog window is displayed and it is possible to set all of usual
 module options (parameters and flags).
 
+<p> 
 <center>
-<img src="g_gui_gmodeler_dlg_module.png">
+<a href="g_gui_gmodeler_dlg_module.png"><img src="g_gui_gmodeler_dlg_module.png"
+width="400"></a>
 <br>
 <i>Figure: Dialog for adding GRASS commands to model.</i>
 </center>
@@ -204,7 +207,8 @@ raster data) are parameterized. Parameterized elements have a little thicker boa
 in model scheme with diagrams.
 
 <center>
-<img src="g_gui_gmodeler_parameter.png">
+<a href="g_gui_gmodeler_parameter.png">
+<img src="g_gui_gmodeler_parameter.png" width="500"></a>
 <br>
 <i>Figure: A model parameter settings.</i>
 </center>
@@ -214,13 +218,18 @@ Final model, list of all model items, Python code window with <i>Save</i> and
 <i>Run</i> option are on figures below.
 
 <center>
-<img src="g_gui_gmodeler_zc.png">
+<a href="g_gui_gmodeler_model_avg.png">
+<img src="g_gui_gmodeler_model_avg.png" width="600"></a>
 <br>
 <i>Figure: A model to perform average statistics for zipcode zones.</i>
 </center>
 <br>
 <center>
-<img src="g_gui_gmodeler_zc_items.png">
+<a href="g_gui_gmodeler_items.png">
+<img src="g_gui_gmodeler_items.png" width="600"></a>
+<p>
+<a href="g_gui_gmodeler_python.png">
+<img src="g_gui_gmodeler_python.png" width="600"></a>
 <br>
 <i>Figure: Items with Python editor window.</i>
 </center>
@@ -234,22 +243,177 @@ After model is run with <img src="icons/execute.png" alt="run"> button
 and inputs are set, results can be displayed as follows:
 
 <center>
-<img src="g_gui_gmodeler_avg_auto.png">
+<a href="g_gui_gmodeler_avg_run.png"><img src="g_gui_gmodeler_avg_run.png" width="500"></a>
+<a href="g_gui_gmodeler_avg_map.png"><img src="g_gui_gmodeler_avg_map.png" width="300"></a>
 <br>
 <i>Figure: Average elevation for zipcodes using North Carolina sample dataset as 
 automatic calculation performed by Graphical Modeler.</i>
 </center>
 
 <p>
-Very useful advantage is that for example, this model can later be
-used to calculate (let's say) average precipe value for every
-administrative region in Slovakia using <tt>precip</tt> raster data
-from
+When one wants to run model again with the same data or the same names, it is 
+necessary to use <tt>--overwrite</tt> option. It will cause maps with identical 
+names to be overwritten. Instead of setting it for every 
+module particularly it is handy to change Model Properties settings globally.
+This dialog includes also metadata settings, where model name, model description 
+and autor(s) of model can be set.
+
+<center>
+<a href="g_gui_gmodeler_model_properties.png">
+<img src="g_gui_gmodeler_model_properties.png" width="350"></a>
+<br>
+<i>Figure: Model properties.</i>
+</center>
+
+<p>
+Another useful trick is possibility to set variables. Their content can be used 
+as a substitute for another items. Value of variables can be values such as 
+raster or vector data, integer, float, string value or they may constitute some 
+region, mapset, file or direction data type.   
+
+Then it is not
+necessary to set any parameters for input data. Dialog with viariable settings 
+is automatically displayed after model is run. So, instead of Model parametrers 
+(e.g. <tt>r.import</tt> a <tt>v.import</tt>, see 
+<em><a href="g_gui_gmodeler_avg_run.png">Run model dialog</a></em> above) 
+there are <tt>Variables</tt>.
+
+<center>
+<a href="g_gui_gmodeler_variables_run.png">
+<img src="g_gui_gmodeler_variables_run.png" width="500"></a>
+<br>
+<i>Figure: Model with variable inputs.</i>
+</center>
+
+<p>
+The key point is usage of <tt>%</tt> before the substituting variable and 
+settings in Variables dialog. For example, when there is a model variable 
+<tt>raster</tt> that references a file path and that value is required to be 
+used as one of inputs to a particular model, it should be specified in Variable 
+dialog with competent name (<tt>raster</tt>), data type, default value and 
+description. Then it should be set in module dialog as input called 
+<tt>%raster</tt>.
+
+<center>
+<a href="g_gui_gmodeler_variables.png">
+<img src="g_gui_gmodeler_variables.png" width="600"></a>
+<br>
+<i>Figure: Example of raster file variable settings.</i>
+</center>
+
+<br>
+<center>
+<a href="g_gui_gmodeler_variables_raster.png">
+<img src="g_gui_gmodeler_variables_raster.png" width="600"></a>
+<br>
+<i>Figure: Example of raster file variable usage.</i>
+</center>
+
+<p>
+Finally, model settings can be stored to the file as GRASS Model 
+File <tt>*.gxm</tt> what represents very handy advantage. It can be shared as reusable 
+workflow that be run by different users with different data.
+
+<p>
+For example, this model can later be used to calculate (let's say)
+average precipe value for every administrative region in Slovakia
+using <tt>precip</tt> raster data from
 <a href="https://grass.osgeo.org/uploads/grass/sampledata/slovakia3d_grass7.tar.gz">
 Slovakia precipitation dataset</a> and administration boudaries of Slovakia from 
 <a href="https://www.geoportal.sk/sk/zbgis_smd/na-stiahnutie/">Slovak Geoportal</a>
 (only with a few clicks).
 
+<p>
+There can be some data in a model that did not exist before the process and 
+that it is not worth it to maintain after the process executes. They can 
+be described as being <tt>Intermediate</tt> by single clicking using the right 
+mouse button, see figure below. All such data should be deleted following 
+model completion. The boundary of intermediate component is dotted line.
+
+<center>
+<a href="g_gui_gmodeler_intermediate_data.png">
+<img src="g_gui_gmodeler_intermediate_data.png" width="400"></a>
+<br>
+<i>Figure: Usage and definition of intermediate data in model.</i>
+</center>
+ 
+<p>
+Using Python editor in wxGUI Graphical Modeler one can add python code and then 
+run it with <tt>Run</tt> button or just save it as python script <tt>*.py</tt>.
+Result is shown below.
+
+<center>
+<a href="g_gui_gmodeler_python_code.png">
+<img src="g_gui_gmodeler_python_code.png" width="350"></a>
+<a href="g_gui_gmodeler_python_code_result.png">
+<img src="g_gui_gmodeler_python_code_result.png" width="350"></a>
+<br>
+<i>Figure: Python editor in wxGUI Graphical Modeler.</i>
+</center>
+
+<p>
+In example below <a href="https://ladsweb.nascom.nasa.gov/data/search.html">
+MODIS</a> data products are used in loop. It is about that original data are 
+stored as coded integer values that should be multiplied by 
+value <tt>0.0001</tt> to represent real <i>ndvi values</i>. Moreover, GRASS GIS
+provides color table called <tt>ndvi</tt> to present <i>ndvi data</i>.  
+In this case it is not necessary to work with every image separately. 
+<br>
+Graphical 
+Modeler is an appropriate tool to 
+process data in an effective way using loop and variables (<tt>%map</tt> for a 
+particular MODIS image in mapset and <tt>%ndvi</tt> for original data name suffix). 
+After loop component is added to model, it is necessary to define series of maps
+with required settings of map type, mapset, etc.
+
+<center>
+<a href="g_gui_gmodeler_loop_dlg.png">
+<img src="g_gui_gmodeler_loop_dlg.png" width="300"></a>
+<br>
+<i>Figure: MODIS data representation in GRASS GIS after Graphical Modeler usage.</i>
+</center>
+
+<p>
+When model is supplemented by all of modules, these modules should be 
+ticked in the boxes of loop dialog. Final model and it's results are shown below.
+
+<center>
+<a href="g_gui_gmodeler_loop_final.png">
+<img src="g_gui_gmodeler_loop_final.png" width="400"></a>
+<br>
+<i>Figure: Model with loop.</i>
+</center>
+
+<p>
+<center>
+<a href="g_gui_gmodeler_modis_1o.png">
+<img src="g_gui_gmodeler_modis_1o.png" width="300"></a>
+<a href="g_gui_gmodeler_modis_1.png">
+<img src="g_gui_gmodeler_modis_1.png" width="300"></a>
+<a href="g_gui_gmodeler_modis_2o.png">
+<img src="g_gui_gmodeler_modis_2o.png" width="300"></a><br>
+<a href="g_gui_gmodeler_modis_2.png">
+<img src="g_gui_gmodeler_modis_2.png" width="300"></a>
+<a href="g_gui_gmodeler_modis_3o.png">
+<img src="g_gui_gmodeler_modis_3o.png" width="300"></a>
+<a href="g_gui_gmodeler_modis_3.png">
+<img src="g_gui_gmodeler_modis_3.png" width="300"></a>
+<br>
+<i>Figure: MODIS data representation in GRASS GIS after Graphical Modeler usage.</i>
+</center>
+
+<p>
+Steps in command console would be as follows:
+
+<div class="code"><pre>
+# rename original image with preselected suffix
+g.rename raster = %map,%map.%ndvi
+# convert integer values
+r.mapcalc expression = %map = %map.%ndvi * 0.0001
+# set color table appropriate for nvdi data
+r.colors = map = %map color = ndvi
+</pre></div>
+
 <h2>SEE ALSO</h2>
 
 <em>

二進制
gui/wxpython/gmodeler/g_gui_gmodeler_avg_auto.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_avg_map.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_avg_run.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_comment.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_db.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_dlg_module.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_frame1.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_frame2.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_frame3.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_intermediate_data.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_items.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_loop.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_loop_dlg.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_loop_final.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_lower_toolbar.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_model_avg.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_model_classification.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_model_landslides.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_model_properties.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_model_usle.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modis_1.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modis_1o.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modis_2.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modis_2o.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modis_3.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modis_3o.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modul.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_modulex.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_parameter.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_python.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_python_code.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_python_code_result.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_raster.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_raster3d.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_relation.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_toolbar.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_variables.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_variables_raster.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_variables_run.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_vector.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_zc.png


二進制
gui/wxpython/gmodeler/g_gui_gmodeler_zc_items.png