Dylan,
the algorithms used in these programs are very well documented but it would be great if we had a volunteer who would include the equations into the code for the doxygen documentation. I will be happy to provide the equations in latex format.
This is where you can find the equations and algorithms:
Neteler, Mitasova GRASSbook (see appendix B.3) http://mpa.itc.it/grassbook2/
M. Neteler, H. Mitasova, 2004. Open Source GIS: A GRASS GIS Approach. Second Edition. 424 pages, Kluwer Academic Publishers, Boston, Dordrecht, ISBN 1-4020-8064-6 (Also published as eBook, ISBN 1-4020-8065-4).
or get the papers listed in the manual pages (but the book has it all on 4 pages as close to the code as possible)
http://grass.itc.it/grass61/manuals/html61_user/r.slope.aspect.html
http://grass.itc.it/grass61/manuals/html61_user/v.surf.rst.html
Also, there is a developer on this list (Brad, can you give us an update?) who has added additional algorithm for computation of slope/aspect into r.slope.aspect but it has not been submitted yet
(curvatures may be holding it)
Helena
Beaudette wrote:
Greetings,
After reading a recent publication on the pros/cons of various algorithms for calculating slope and aspect from gridded data [1], I became very curious about which algorithms are implemented in some of the r.* and v.* commands . A link to the science direct webpage and article text is included at the bottom: note the long URL.
For example, the following commands can generate slope and aspect maps:
r.slope.aspect
r.param.scale
v.surf.rst
r.resamp.rstAccording to the publication [1] , there are a number of ways in which slope and aspect can be calculated (pages 4 - 6) : i.e. "three-point plane" , "four closest neighbors" , "eight neighbors unweighted" ...
According to the paper, the "eight neighbors unweighted" algorithm, was the most robust (at least when tested with a Monte Carlo style error analysis) for slope, aspect, and topographic index calculations.
I looked through the source for r.slope.aspect, and could not determine which method was being used.
Do any of the developers know which algorithms are used for the various commands mentioned above to calculate slope and aspect values?
I think that it would be a good idea to:
1. document the slope/aspect algorithms being used in the various r.* commands
2. add some code to allow for different algorithms to be used (maybe just in r.slope.aspect)thanks!
References:
1. Lynn D. Raaflaub and Michael J. Collins, The effect of error in gridded digital elevation models on the estimation of topographic parameters, Environmental Modelling & Software, In Press, Corrected Proof, Available online 27 April 2005, .
http://www.sciencedirect.com/science?_ob=GatewayURL&_method=citationSearch&_uoikey=B6VHC-4G1WYF2-1&_origin=SDEMFRASCII&_version=1&md5=ed8513abe73e9f178164c3bb35ca4ba3