Changes between Version 8 and Version 9 of GSoC/2014/ImplementationOf3DRasterFlowLine


Ignore:
Timestamp:
Jul 11, 2014, 2:12:34 PM (10 years ago)
Author:
annakrat
Comment:

week 8

Legend:

Unmodified
Added
Removed
Modified
  • GSoC/2014/ImplementationOf3DRasterFlowLine

    v8 v9  
    123123The gradient array (2x2x2) is not computed every time when the algorithm requests the values, but instead, when it's close enough, it reuses the last gradient values (which happens quite often with reasonably small step size). As profiling showed, it made a significant difference. I wanted to see if computing gradient in larger window would improve it even more, however this required to rewrite this part and the code became too complicated and difficult to maintain because of handling map edges and other things that I decided to leave this approach. Moreover preliminary testing didn't show convincing improvement. I might get to it later.
    124124Then, I started rewriting the module in c, some parts which are not likely to be changed. That made me reconsider and reorganize a few things in the main script.
     125
     126=== Week 8 ===
     127I continued with rewriting the module into C and the current state is in GRASS [source:/grass-addons/grass7/raster3d/r3.flow addons] (not sandbox anymore). The functionality of the module includes generating flow lines. Flow accumulation and gradient computation will follow. I tested it against the Python implementation and after fixing some problems (in both implementations) I get the same flow lines (with one type of data). The vertices along the flow lines do not match perfectly, however there is no difference in the flow lines themselves. I keep fixing the Python version, I will still use it for testing.
     128
     129As expected, the C module is much much faster than the Python version. I also added function documentation.