Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use r.cost and r.walk and r.drain to calculate the shortest path from an archaeological site to the nearest basalt source. I am using all this algorithms with the processing toolbox (I have no grass experience...). I am able to run both r.cost and r.walk but when I try to use r.drain I have a python error. I thought I can use the rasters created to obtain the path in another program (Yes, like ArcMap). In order to do so I need the "movement direction raster" that you are suppose to get either from r.walk or r. cost. Nevertheless, when I use r.cost or r.walk from the processing toolbox and I can only visualize the cumulative costs rasters and not the direction ones. I also looked for an option to define a name and a path for the movement direction raster showing advanced parameters, but I have no luck either. ¿Does somebody know how to produce this movement direction raster? (if possible from the processing toolbox). I am using Dufour 64bits on win7 16mb of ram (standalone install and osGeo4w install)

Thanks in advance


PS. This is the Python error: An error has occured while executing Python code:

Traceback (most recent call last): File "C:\Users\IIAMaps/.qgis2/python/plugins\processing\gui\", line 208, in accept self.setParamValues() File "C:\Users\IIAMaps/.qgis2/python/plugins\processing\gui\", line 143, in setParamValues self.paramTable.valueItems[]): File "C:\Users\IIAMaps/.qgis2/python/plugins\processing\gui\", line 189, in setParamValue value.append(options[index]) IndexError: list index out of range

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version: 2.0.1-Dufour Dufour, d94c044

Python path: ['C:\Users\IIAMaps/.qgis2/python/plugins\processing', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python', 'C:\Users\IIAMaps/.qgis2/python', 'C:\Users\IIAMaps/.qgis2/python/plugins', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins', 'C:\Program Files (x86)\ArcGIS\bin', 'C:\PROGRA~1\QGISDU~1\bin\', 'C:\PROGRA~1\QGISDU~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISDU~1\bin', 'C:\PROGRA~1\QGISDU~1\apps\Python27', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg', 'C:\Users\IIAMaps\.qgis2\python\plugins\mmqgis/forms', 'C:\PROGRA~1\QGISDU~1\apps\qgis\python\plugins\fTools\tools']

share|improve this question
Please consider to post the r.drain python error... – markusN Nov 10 '13 at 5:42
@MarkusN I included the Python error in my question. I have no way to put it as acomment (too long) – Gerardo Jimenez Nov 10 '13 at 15:39
To me that looks like a QGIS error (looking at your message)..."qgis2/python/plugins\processing\gui\" – markusN Nov 12 '13 at 22:14
up vote 2 down vote accepted

yo can obtain a "movement direction raster" or simply "direction raster" with the tool "watershed", selecting only the correct output.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.