Skip to content

Commit 154f4d6

Browse files
author
volayaf@gmail.com
committed
added how-to about grass description files (yet to be finished)
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@168 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent fa6a4e5 commit 154f4d6

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
A short guide for creating and editing GRASS algorithms for SEXTANTE:
2+
-----------------------------------------------------------------------
3+
4+
Each GRASS command, to be executed from a SEXTANTE element such as the toolbox or the graphical modeler, needs to be described to let SEXTANTE know the inputs required by the commands, the output it generates and the parameters that are used to configure it. Each command is described in a separate text file, although some commands might be split in several algorithms, needing thus several files and adding more than one new entry to the algorithms list of SEXTANTE.
5+
6+
Here is an explanation of the content of these descriptions files, so you can create you own ones or edit current ones to improve them.
7+
8+
Each file starts with three lines containing:
9+
10+
-The name of the grass command to call to execute the algorithm (e.g. v.buffer)
11+
-The name of the algorithm to show to the user. This is usually the same as the grass command, but it can be different
12+
-The name of the group where you want the command to appear
13+
14+
After this three lines, a variable number of lines appear, describing all inputs and ouputs. Here is a brief explanation of the format of these lines, depending on the type of parameter or output to be described. All declarations are contained in a single line, with elements separated by the symbol "|"
15+
16+
-A raster layer
17+
18+
ParameterRaster|[name of GRASS parameter]|[description of parameter to show]|True/False, indicating if the parameter is optional or not
19+
20+
-A vector layer
21+
22+
ParameterVector|[name of GRASS parameter]|[description of parameter to shown]|[A number indicating the type of geometry]|True/False, indicating if the parameter is optional or not
23+
24+
To indicate the type of geometry, use the following values:
25+
26+
-1: any geometry
27+
0: points
28+
1: lines
29+
2: polygons
30+
31+
32+
33+
-A numerical value
34+
35+
ParameterNumericalValue|[name of GRASS parameter]|[description of parameter to show]|[min value]|[max value]|[default value]
36+
37+
"None" can be used for both min and max values to indicate that there is no lower or upper limit.
38+
39+
If the default value is written as a real number (i.e. it contains a decimal point, even if it is an integer value like 4.0), the parameter can take any value, including decimal ones. If it is written as an integer (i.e. 4), the parameter is assumed to accept only integer values
40+
41+
-A string
42+
43+
ParameterString|[name of GRASS parameter]|[description of parameter to show]|[default value]

0 commit comments

Comments
 (0)