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@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?
Michael
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
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@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@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
Markus,
I applied your patch and got the following compiler error:
cmb-MBP-2:r.watershed cmbarton$ make
make -C ram || echo /Users/cmbarton/grass_dev/grass6_src/raster/r.watershed/ram >> /Users/cmbarton/grass_dev/grass6_src/error.log
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for target `htmletc'
make htmletc
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for target `htmletc'
No docs to generate.
make -C seg || echo /Users/cmbarton/grass_dev/grass6_src/raster/r.watershed/seg >> /Users/cmbarton/grass_dev/grass6_src/error.log
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for target `htmletc'
make htmletc
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for target `htmletc'
No docs to generate.
make -C front || echo /Users/cmbarton/grass_dev/grass6_src/raster/r.watershed/front >> /Users/cmbarton/grass_dev/grass6_src/error.log
gcc -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/include -arch i386 -Os -DPACKAGE=\""grassmods"\" -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/include -o OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c: In function ‘main’:
main.c:224: error: stray ‘\202’ in program
make[1]: *** [OBJ.i386-apple-darwin9.6.0/main.o] Error 1
On Dec 20, 2008, at 1:54 AM, Markus Metz wrote:
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@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@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
Michael Barton wrote:
> 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);
I applied your patch and got the following compiler error:
r.watershed/front >> /Users/cmbarton/grass_dev/grass6_src/error.log
gcc -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/
include -arch i386 -Os -DPACKAGE=\""grassmods"\" -I/Users/
cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/include -o
OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c: In function �main�:
main.c:224: error: stray �\202� in program
main.c:224: error: stray �\202� in program
Presumably, that's in the line you added.
I suspect an error in the copy/paste from the email. I've attached
Markus' suggested change as a binary attachment.
--
Glynn Clements <glynn@gclements.plus.com>
(attachments)
r.watershed.patch (588 Bytes)
This worked. Thanks.
Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
On Dec 20, 2008, at 9:06 PM, Glynn Clements wrote:
Michael Barton wrote:
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);
I applied your patch and got the following compiler error:
r.watershed/front >> /Users/cmbarton/grass_dev/grass6_src/error.log
gcc -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/
include -arch i386 -Os -DPACKAGE=\""grassmods"\" -I/Users/
cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/include -o
OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c: In function �main�:
main.c:224: error: stray �\202� in program
Presumably, that's in the line you added.
I suspect an error in the copy/paste from the email. I've attached
Markus' suggested change as a binary attachment.
--
Glynn Clements <glynn@gclements.plus.com>
<r.watershed.patch>
Michael Barton wrote:
This worked. Thanks.
Thanks Glynn, I couldn't figure out where this error came from. Patches for this bug: no error if length.slope is requested without giving basin threshold are attached to ticket 398 [1], separately for grass64 and grass70.
Markus M
[1] http://trac.osgeo.org/grass/ticket/398
Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
On Dec 20, 2008, at 9:06 PM, Glynn Clements wrote:
Michael Barton wrote:
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);
I applied your patch and got the following compiler error:
r.watershed/front >> /Users/cmbarton/grass_dev/grass6_src/error.log
gcc -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/
include -arch i386 -Os -DPACKAGE=\""grassmods"\" -I/Users/
cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/include -o
OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c: In function �main�:
main.c:224: error: stray �\202� in program
Presumably, that's in the line you added.
I suspect an error in the copy/paste from the email. I've attached
Markus' suggested change as a binary attachment.
--
Glynn Clements <glynn@gclements.plus.com>
<r.watershed.patch>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev