Installing

Windows XP

Ensure that Windows XP has been updated with Service Pack 2.

1. Install QuantumGIS

Download the latest distribution of QuantumGIS (minimum 2.0) and go through the installation wizard.

2. Install Python 2.7

Download Python 2.7 from www.python.org and install it.

3. Install GRASS 6.4

Download and install the GRASS 6.4 distribution for Windows from grass.osgeo.org. Make sure you select Important Microsoft Runtime DLLs inside the installation wizard.

4. Setup GRASS 6.4

Open Grass 6.4 for the first time and define a new location by using the Location wizard:

  1. Enter as GIS Data Directory C:\DOCUME~1\user\MYDOCU~1\grassdata(user corresponds to your local user name) and as Project Location nc_spm_08(or any desired name - reflect changes below);
  2. Check Select EPSG code of spatial reference system;
  3. Enter as EPSG code 3395(or any desired spatial reference system using metric units);
  4. Select Do not apply any datum transformations;
  5. Set extents of the mapset if needed;
  6. Create new mapset named user1(or any desired name - reflect changes below);
  7. Quit GRASS 6.4.

Add the following environment variables to your system:

GISBASE= C:\PROGRA~1\GRASSG~1.4
GISRC= C:\DOCUME~1\user\grassrc6.txt
LD_LIBRARY_PATH= C:\PROGRA~1\GRASSG~1.4\lib
PATH= C:\PROGRA~1\GRASSG~1.4\etc;C:\PROGRA~1\GRASSG~1.4\etc\python;C:\PROGRA~1\GRASSG~1.4\lib;C:\PROGRA~1\GRASSG~1.4\bin;C:\PROGRA~1\GRASSG~1.4\extralib;C:\PROGRA~1\GRASSG~1.4\msys\bin;C:\Python26;
PYTHONLIB= C:\Python26
PYTHONPATH= C:\PROGRA~1\GRASSG~1.4\etc\python
GRASS_SH= C:\PROGRA~1\GRASSG~1.4\msys\bin\sh.exe

Create a grassrc6.txt text file inside C:\DOCUME~1\user\ containing the following:

GISDBASE: C:\DOCUME~1\user\MYDOCU~1\grassdata
LOCATION_NAME: nc_spm_08
MAPSET: user1
GRASS_DB_ENCODING: ascii

Note: user corresponds to your user name.

5. Patch QuantumGIS

Go into the QuantumGIS folder (usually C:\Program Files\QGIS *version name*) and then further into the bin folder.

Edit the qgis.bat file by removing the highlighted text:

@echo off
call "%~dp0\env.vat"
call "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.4\etc\env.bat
@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-6.4.4\lib;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
set GDAL_FILENAME_IS_UTF8=YES
rem Set_VSI_cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
start "QGIS" /B "%OSGEO4W_ROOT%"\bin\qgis-bin.exe %*

6. Install the MODEL tool within QuantumGIS

Start QuantumGIS and go into Plugins>Manage and Install Plugins....

Search for MODEL inside the list of plugins, select it and click Install plugin.

When finished, a menu entry will appear as Plugins>MODEL>MODEL, as well as the icon inside the top toolbar of QuantumGIS. The MODEL tool may be launched from either of the two.

Note: If you have downloaded the plugin separately, copy it inside the C:\Program Files\QGIS *version name*\apps\qgis\python\plugins folder.

Ubuntu

1. Install QuantumGIS

sudo apt-get update
sudo apt-get install qgis python-qgis

In case of keyserver errors add the qgis.org repository public key to your apt keyring, type:

gpg --keyserver keyserver.ubuntu.com --recv 47765B75
gpg --export --armor 47765B75 | sudo apt-key add -

Note: If QuantumGIS is installed differently, make sure it does not install the GRASS plugin.

2. Install Python 2.7

sudo apt-get install python2.7

3. Install GRASS 6.4

sudo apt-get install grass64

Note: The default installation folder should be /usr/lib/grass64. If this is not the case, change the occurences below to the correct path.

4. Setup GRASS 6.4

Open Grass 6.4 for the first time and define a new location by using the Location wizard:

  1. Enter as GIS Data Directory /home/user/grassdata(user corresponds to your local user name) and as Project Location nc_spm_08(or any desired name - reflect changes below);
  2. Check Select EPSG code of spatial reference system;
  3. Enter as EPSG code 3395(or any desired spatial reference system using metric units);
  4. Select Do not apply any datum tranformations;
  5. Set extents of the mapset if needed;
  6. Create new mapset named user1(or any desired name - reflect changes below);
  7. Quit GRASS 6.4.

Add the following environment variables to your system:

export GISBASE="/usr/lib/grass64"
export PATH="$PATH:$GISBASE/bin:$GISBASE/scripts"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GISBASE/lib"
export GIS_LOCK=$$
export GISRC="$HOME/.grassrc6"
export PYTHONPATH="$PYTHONPATH:$GISBASE/etc/python"

Create a .grassrc6 text file inside your home folder containing the following:

GISDBASE: /home/user/grassdata
LOCATION_NAME: nc_spm_08
MAPSET: user1
GRASS_DB_ENCODING: ascii

Note: user corresponds to your user name.

5. Install the MODEL tool within QuantumGIS

Start QuantumGIS and go into Plugins>Manage and Install Plugins....

Search for MODEL inside the list of plugins, select it and click Install plugin.

When finished, a menu entry will appear as Plugins>MODEL>MODEL, as well as the icon inside the top toolbar of QuantumGIS. The MODEL tool may be launched from either of the two.

Note: If you have downloaded the plugin separately, copy it inside the ~/.qgis2/python/plugins folder.