Configuring and using GRASS from SEXTANTE.


This documents describes how to configure SEXTANTE so it can call GRASS algorithms and incorporate them into its own set of geoalgorithms. It also gives some additional information on the mechanism used by SEXTANTE to integrate GRASS functions, which should be useful for all users, but specially for those familiar with the GRASS command-line interface.

Configuring SEXTANTE to use GRASS takes just a few easy steps. Once you have configured the system, you will be able to execute GRASS algorithms from any SEXTANTE component like the toolbox or the graphical modeller, just like you do with any other SEXTANTE geoalgorithm.

Open the settings dialog and select the GRASS menu. You will see something like this:



Only two parameters must be set, namely:


Once you have set the previous paths, click on OK to close the settings dialog. SEXTANTE will now try to execute GRASS and create the definition files that are used to generate the graphical interfaces of all the suitable GRASS algorithms, along with the corresponding help files. This process might take a few seconds. If you are running Windows, you will see a new window (by default it is minimized). Just wait until it closes. After that, GRASS algorithms will be shown in the toolbox and identified with a GRASS icon. They will appear in a new branch named "GRASS" in the algorithms tree -which contains two groups: raster (r.*) and vector (v.*)-, and also in the usual groups used for built-in SEXTANTE algorithms. This way, it is easier to find the right algorithm, both for SEXTANTE users with no previous GRASS experience and former GRASS users.

Not all GRASS algorithms are available from SEXTANTE. Some of them are not compatible with the architecture of SEXTANTE and its algorithm-definition semantics, while others do not make much sense in the context of SEXTANTE (like, for instance, those used to digitize and create new vector layer). Unsuitable algorithms are automatically removed and will not appear in any SEXTANTE component.

How the SEXTANTE-GRASS integration works. Limitations and other issues.


If you are a GRASS user, it might be useful for you to know how SEXTANTE calls GRASS algorithms and comunicates with the GRASS interface. This can be summarized in the following steps:


All this steps are stored in a batch file that is executed using the GRASS_BATCH_JOB variable. When SEXTANTE invokes GRASS, the commands in the batch file are executed and GRASS closes up automatically after that.