Statistics
| Revision:

gvsig-geoprocess / org.gvsig.geoprocess / trunk / org.gvsig.geoprocess / org.gvsig.geoprocess.app / org.gvsig.geoprocess.app.mainplugin / src / main / resources / help / en / general / modeler.html @ 338

History | View | Annotate | Download (12.2 KB)

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2

    
3
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
4
original version by:  Nikos Drakos, CBLU, University of Leeds
5
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
6
* with significant contributions from:
7
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8
<HTML>
9
<HEAD>
10
<TITLE>The SEXTANTE graphical modeler</TITLE>
11
<META NAME="description" CONTENT="The SEXTANTE graphical modeler">
12
<META NAME="keywords" CONTENT="IntroductionToSEXTANTE">
13
<META NAME="resource-type" CONTENT="document">
14
<META NAME="distribution" CONTENT="global">
15

    
16
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
18
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19

    
20
<LINK REL="STYLESHEET" HREF="IntroductionToSEXTANTE.css">
21

    
22
</HEAD>
23

    
24
<BODY >
25
<!--Table of Child-Links-->
26
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
27

    
28
<UL CLASS="ChildLinks">
29
<LI><A NAME="tex2html164"
30
  HREF="node5.html#SECTION00510000000000000000">Introduction</A>
31
<LI><A NAME="tex2html165"
32
  HREF="node5.html#SECTION00520000000000000000">Definition of inputs</A>
33
<LI><A NAME="tex2html166"
34
  HREF="node5.html#SECTION00530000000000000000">Definition of the workflow</A>
35
<LI><A NAME="tex2html167"
36
  HREF="node5.html#SECTION00540000000000000000">Editing the model</A>
37
<LI><A NAME="tex2html168"
38
  HREF="node5.html#SECTION00550000000000000000">Saving and loading models</A>
39
</UL>
40
<!--End of Table of Child-Links-->
41
<HR>
42

    
43
<H1><A NAME="SECTION00500000000000000000">
44
The SEXTANTE graphical modeler</A>
45
</H1>
46

    
47
<P>
48

    
49
<H1><A NAME="SECTION00510000000000000000">
50
Introduction</A>
51
</H1>
52

    
53
<P>
54
The <SPAN  CLASS="textit">graphical modeler</SPAN> allows to create complex models using a simple and easy-to-use interface. When working with a GIS, most analysis operations are not isolated, but part of a chain of operations instead. Using the graphical modeler, that chain of processes can be wrapped into a single process, so it is easier and more convenient to execute than a single process later on a different set on inputs. No matter how many steps and different algorithms it involves, a model is executed as a single algorithm, thus saving time and effort, specially for larger models.
55

    
56
<P>
57
The modeler has a working canvas where the structure of the model and the workflow it represents are shown. On the left part of the window, a panel with two tabs can be used to add new elements to the model.
58

    
59
<P>
60
<DIV ALIGN="CENTER">
61
<IMG
62
  WIDTH="770" HEIGHT="541" ALIGN="BOTTOM" BORDER="0"
63
 SRC="./graphical_modeler.png"
64
 ALT="Image graphical_modeler">
65

    
66
</DIV>
67

    
68
<P>
69
Creating a model is a two-step process.
70

    
71
<P>
72

    
73
<UL>
74
<LI><SPAN  CLASS="textit">Definition of necessary inputs</SPAN>. These inputs will be added to the parameters window, so the user can set their values when executing the model. The model itself is a SEXTANTE algorithm, so the parameters window is generated automatically as it happens with all the algorithms included in the library.
75
</LI>
76
<LI><SPAN  CLASS="textit">Definition of the workflow</SPAN>. Using the input data of the model, the workflow is defined adding algorithms and selecting how they use those inputs or the outputs generated by other algorithms already in the model 
77
</LI>
78
</UL>
79

    
80
<P>
81

    
82
<H1><A NAME="SECTION00520000000000000000">
83
Definition of inputs</A>
84
</H1>
85

    
86
<P>
87
The first step to create a model is to define the inputs it needs. The following elements are found in the <SPAN  CLASS="textit">Inputs</SPAN> tabs on the left side of the modeler window:
88

    
89
<P>
90

    
91
<UL>
92
<LI>Band
93
</LI>
94
<LI>Raster layer
95
</LI>
96
<LI>Vector layer 
97
</LI>
98
<LI>String
99
</LI>
100
<LI>Table field
101
</LI>
102
<LI>Coordinate (Point)  
103
</LI>
104
<LI>Table
105
</LI>
106
<LI>Fixed table
107
</LI>
108
<LI>Multiple input
109
</LI>
110
<LI>Selection
111
</LI>
112
<LI>Numerical value 
113
</LI>
114
<LI>Boolean value 
115
</LI>
116
</UL>
117

    
118
<P>
119
Double-clicking on any of them, a dialog is shown to define its caracteristics. Depending on the parameter itself, the dialog will contain just one basic element (the description, which is what the user will see when executing the model) or more of them. For instance, when adding a numerical value, as can be seen in the next figure, apart from the description of the parameter is needed to set a default value, the type of numerical value and a range of valid values.
120

    
121
<P>
122
<DIV ALIGN="CENTER">
123
<IMG
124
  WIDTH="388" HEIGHT="229" ALIGN="BOTTOM" BORDER="0"
125
 SRC="./models_parameters.png"
126
 ALT="Image models_parameters">
127

    
128
</DIV>
129

    
130
<P>
131
For each added input, a new element is added to the modeler canvas.
132

    
133
<P>
134
<DIV ALIGN="CENTER">
135
<IMG
136
  WIDTH="244" HEIGHT="73" ALIGN="BOTTOM" BORDER="0"
137
 SRC="./models_parameters2.png"
138
 ALT="Image models_parameters2">
139

    
140
</DIV>
141

    
142
<P>
143

    
144
<H1><A NAME="SECTION00530000000000000000">
145
Definition of the workflow</A>
146
</H1>
147

    
148
<P>
149
Once the inputs have been defined, it is time to define the algorithms to apply on them. Algorithms can be found in the <SPAN  CLASS="textit">Processes</SPAN> tab, grouped much in the same way as they are in the toolbox.
150

    
151
<P>
152
<DIV ALIGN="CENTER">
153
<IMG
154
  WIDTH="747" HEIGHT="527" ALIGN="BOTTOM" BORDER="0"
155
 SRC="./models_parameters3.png"
156
 ALT="Image models_parameters3">
157

    
158
</DIV>
159

    
160
<P>
161
To add a process, double-click on its name. An execution dialog will appear, with a content similar to the one found execution panel that SEXTANTE shows when executing the algorithm from the toolbox.
162

    
163
<P>
164
<DIV ALIGN="CENTER">
165
<IMG
166
  WIDTH="697" HEIGHT="478" ALIGN="BOTTOM" BORDER="0"
167
 SRC="./models_parameters4.png"
168
 ALT="Image models_parameters4">
169

    
170
</DIV>
171

    
172
<P>
173
Some differences exist, however, the main one being the absence of a raster ouput tab, even if the selected algorithm generates raster layers as output.
174

    
175
<P>
176
Instead of the textbox that was used to set the filepath for output layers and tables, a checkbox and a text box are found. If the layer generated by the algorithm is just a temporary result that will be used as the input of another algorithm and should not be kept as a final result, the check box should be left unchecked. Checking it means that the result is a final one, and you have to supply also a valid description for the output, which will be the one the user will see when executing the model. 
177

    
178
<P>
179
Selecting the value of each parameter is also a bit different, since there are importante differences between the context of the modeler and the toolbox one. Let's see how to introduce the values for each type of parameter.
180

    
181
<UL>
182
<LI>Layers (raster and vector) and tables. They are selectend from a list, but in this case the possible values are not the layers or tables currently loaded in the GIS, but the list of model input or the corresponding type, or other layers or tables generated by algorithms already added to the model.
183
</LI>
184
<LI>Numerical values. Literal values can be introduced directly on the textbox. This textbox is a list that can be used to select any of the numerical value input of the model. In this case, the parameter will take the value introduced by the user when executing the model. 
185
</LI>
186
<LI>String. Like in the case of numerical values, literal strings can be typed, or an input string can be selected
187
</LI>
188
<LI>Points. Coordinates cannot be directly introduced. Use the list to select one of the coordinate inputs of the model
189
</LI>
190
<LI>Bands. The number of bands of the parent layer cannot be known at design-time, so it is not possible to show the list of available bands. Instead, a list with band numbers from 1 to 250, as well as the band parameters of the model, is shown. At run-time, SEXTANTE will check if the parent raster layer selected by the user has enough bands and the given band has therefore a valid value, and if not it will generate an error message.
191
</LI>
192
<LI>Table field. Like in the previous case, the fields of the parent table or layer cannot be known at design-time, since they depend of the selection of the user each time the model is executed. To set the value for this parameter, type the name of a field directly in the textbox, or use the list to select a table field input already added to the model. The validity of the selected field will be checked by SEXTANTE at run-time
193
</LI>
194
<LI>Selection. The list contains in this case not only the available option from the algorithm, but also the selection inputs already added to the current model
195
</LI>
196
</UL>
197

    
198
<P>
199
Once all the parameter have been assigned valid values, click on <SPAN  CLASS="textit">OK</SPAN> and the algorithm will be added to the canvas. It will be linked to all the other elements in the canvas, whether algorithms or inputs, which provide objects that are used as inputs for that algorithm.
200

    
201
<P>
202
<DIV ALIGN="CENTER">
203
<IMG
204
  WIDTH="746" HEIGHT="526" ALIGN="BOTTOM" BORDER="0"
205
 SRC="./models_parameters5.png"
206
 ALT="Image models_parameters5">
207

    
208
</DIV>
209

    
210
<P>
211

    
212
<H1><A NAME="SECTION00540000000000000000">
213
Editing the model</A>
214
</H1>
215

    
216
<P>
217
Once the model has been designed, it can be executed clicling on the <SPAN  CLASS="textit">Execute</SPAN> button. The execution window will have a parameters tab automatically created based on the requirements of the model (the inputs added to it), just like it happens when a simple algorithm is executed. If any of the algorithms of the model generates raster layers, the <SPAN  CLASS="textit">Raster output</SPAN> tab will be added to the window. 
218

    
219
<P>
220
Elements can be dragged to a different position within the canvas, to change the way the module structure is displayed and make it more clear and intuitive. Links between elements are update automatically.
221

    
222
<P>
223
To change the parameters of any of the algorithms of a model, double-click on it to acces its parameters window.
224

    
225
<P>
226
To delete an element, right-click on it and select <SPAN  CLASS="textit">Delete</SPAN>. Only those elements that do not have any other one depending on them can be deleted. If you try to delete an element that cannot be deleted, SEXTANTE will show the following warning message.
227

    
228
<P>
229

    
230
<H1><A NAME="SECTION00550000000000000000">
231
Saving and loading models</A>
232
</H1>
233

    
234
<P>
235
Models can be saved to be executed or edited at a later time. Use the <SPAN  CLASS="textit">Save</SPAN> button to save the current model and the <SPAN  CLASS="textit">Open</SPAN> model to open any model previously saved. Model are saved in an XML file with the .model extension.
236

    
237
<P>
238
<DIV ALIGN="CENTER">
239
<IMG
240
  WIDTH="745" HEIGHT="77" ALIGN="BOTTOM" BORDER="0"
241
 SRC="./models_parameters6.png"
242
 ALT="Image models_parameters6">
243

    
244
</DIV>
245

    
246
<P>
247
Models saved on the models folder will appear in the toolbox in a group that you can set using the boxes in the top of the modeler window. Type in the name of the model and then select a group from the drop-down list. The list contains all the names of the already existing groups, and also an additional group named ``Models''. If none of this group suits your needs, you can type a new name directly in that box, which is editable. 
248

    
249
<P>
250
When the toolbox is invoked, SEXTANTE searches the models folder for files with .model extension and loads the models they contain. Since a model is itself a SEXTANTE algorithm, it can be added to the toolbox just like any other algorithm.
251

    
252
<P>
253
The models folder can be set from the SEXTANTE toolbox, clicking the configuration button and then introducing the path to the folder in the corresponding field. Go to the ``Folders'' tab to find it.
254

    
255
<P>
256
Models loaded from the models folder appear not only in the toolbox, but also in the algorithms tree in the <SPAN  CLASS="textit">Processes</SPAN> tab of the modeler window. That means that you can incorporate a model as a part of a bigger model, just as you add any other algorithm. however, models are shown with a different icon, to make it easy to recognize them.
257

    
258
<P>
259
<DIV ALIGN="CENTER">
260
<IMG
261
  WIDTH="310" HEIGHT="112" ALIGN="BOTTOM" BORDER="0"
262
 SRC="./models_icon.png"
263
 ALT="Image models_icon">
264

    
265
</DIV>
266

    
267
<P>
268
By default, the models folder is the same one as the folder where SEXTANTE help files are located. This folder contains a small set of example models, that you can use to better understand how the modeler works. Open them and study how they are constructed. You can also check their associated help files. As it has been said, models are themselves SEXTANTE algorithms, so they can have their own help files, and these can be edited as we have already seen in the previous chapter.
269
<BR><HR>
270
<ADDRESS>
271
Victor Olaya
272
2010-02-18
273
</ADDRESS>
274
</BODY>
275
</HTML>