[GRASS-dev] question about error in r.watershed
Markus Metz
markus.metz.giswork at googlemail.com
Sat Dec 20 03:54:40 EST 2008
Michael Barton wrote:
> I am running the new r.watershed (SVN from 10 December) and got an
> error in calculating the ls factor.
>
> r.watershed elevation=elevation.dem at PERMANENT length.slope=atest_rs_ls
> memory=300
> ERROR: /Applications/GRASS-6.4.app/Contents/MacOS/etc/r.wate
> rshed.ram [-4] el=elevation_map t=swale_threshold
> [dr=drain_direction_map] [de=depression_map]
> [ac=accumulation_map] [di=display_map] [ms=max_slope_length]
> [ob=overland_blocking_map] [S=slope_steepness_map]
> LS=length_slope_map [r=rill_erosion_map]
> [sd=slope_deposition value or map]
> Subprocess failed with exit code 256
> category information for [atest_rs_ls] in [PERMANENT]
> missing or invalid
>
> Am I doing something wrong, or is this a bug?
This is a bug. If you specify length.slope you must give a basin
threshold value.
Running
r.watershed elevation=elevation.dem at PERMANENT length.slope=atest_rs_ls
threshold=3000
works.
This is not caught in front/main.c, I will supply a patch
The fix would be to add the following lines in front/main.c at line 223
/* LS factor and basin.thresh */
err += (opt14->answer != NULL && opt6->answer == NULL);
Markus M
More information about the grass-dev
mailing list