sfd support for r.terraflow
|Reported by:||adanner||Owned by:|
Single Flow Direction (sfd) support in r.terraflow is broken. Even when the -s flag is specified, multiple flow directions are used most of the time. Patch included.
The main purpose of the patch is to support single flow directions
properly (SFD) in r.terraflow. The previous version has a -s switch for SFD, but it is not implemented properly. Tools like Hamish's matlab script for converting terraflow flow direction values to sfd are incomplete and sometimes result in ambiguous because they are based on incomplete cases in the terraflow source. With the new patch, sfd should be supported correctly and the terraflow direction grid should only output 1 of 9 possible direction values (0,1,2,4,8,16,32,64,128), instead of the 256 directions it printed before.
The second purpose of the patch is to eliminate gcc 4.2 warnings of the
warning: deprecated conversion from string constant to ‘char*’
This required making two new C files to handle the option parsing in
C-style instead of C++. The changes are minor but touched several files. The actual flow direction fix is rather localized. New files have been indented according to the SUBMITTING rules
users using the default Multiple Flow Direction (mfd) options should
see no changes. Users of sfd should notice that it works.
Change History (25)
follow-up: 9 comment:8 by , 15 years ago
|Milestone:||6.4.0 → 7.0.0|
|Version:||svn-develbranch6 → svn-trunk|
follow-up: 13 comment:12 by , 15 years ago
|CPU:||Unspecified → All|
|Milestone:||7.0.0 → 6.4.0|
|Platform:||Unspecified → All|