[GRASS-dev] patch for r.terraflow

Andrew Danner adanner at cs.swarthmore.edu
Fri Jun 27 13:34:58 EDT 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: terraflow.svn.udiff
Type: text/x-patch
Size: 17597 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080627/46086537/terraflow.svn.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tflowopts.c
Type: text/x-csrc
Size: 5371 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080627/46086537/tflowopts.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tflowopts.h
Type: text/x-chdr
Size: 992 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080627/46086537/tflowopts-0001.bin


More information about the grass-dev mailing list