1

Update#1:I changed to work under qgis 1.8, I only input the DEM file and run the r.watershed module, and I got this: enter image description here


I have a DEM file of one specified region, and I take the following steps to get files that might be used:

  1. Fill Sinks(this one I use SAGA module instead of GRASS)
  2. r.fill.dir

After step 2, I want to get flow accumulation file, but I can not find this kind of module in GRASS, so I pass it and directly try the r.watershed module.

There are several input options in this module, like this:enter image description here

I tried any of files I have as input files, but I can't get the output files through this module, and always got this error message: enter image description here

The log below told me that the data source is invalid, and I go to check the sextante message log:

ERROR|Wed Jan 22 2014 12:38:01|Could not load model watersheds.model|ALGORITHM:saga:catchmentarea(parallel)

What should I do to successfully use the r.watershed module?

Thanks for giving me any suggestion!

4

Please do not use sink-filling for r.watershed, it is nor needed nor desired. r.watershed takes care by itself due to its internal least cost routing algorithm.

A minimalistic example:

r.watershed elev=dem basin=catchments thresh=10000

For a tutorial, see http://grasswiki.osgeo.org/wiki/Creating_watersheds

  • thanks for your advice, I just input DEM file and set 10000 as the threshold value, but I got the same result. – Heinz Jan 23 '14 at 2:40
  • This question is old, but looking at the error message, it seems you are trying to work externally from GRASS. You need to write your data to GRASS, do your analysis in GRASS, and finally (if you need) export your data to another format. – MikeRSpencer Aug 24 '16 at 14:01
  • @MikeRSpencer: he was using "Processing" (formerly "Sextante") in QGIS which calls GRASS GIS functionality as a backend. – markusN Aug 30 '16 at 17:34
  • Cheers. I'd not followed it through as well as I could have. But if I had it would probably have yielded an answer... – MikeRSpencer Aug 30 '16 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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