Hi all,
First, a general question: with the new trac/osgeo/svn system, what is
the best way to submit patches? I have attached a patch for r.terraflow
below, but if there is a better place to submit, let me know.
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
form
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.
-Andy
(attachments)
terraflow.svn.udiff (17.2 KB)
tflowopts.c (5.25 KB)
tflowopts.h (992 Bytes)