[GRASS-dev] Re: [GRASS GIS] #1006: r.terraflow fails to stat() stream file on Windows

GRASS GIS trac at osgeo.org
Mon Jul 12 03:29:49 EDT 2010


#1006: r.terraflow fails to stat() stream file on Windows
-----------------------------------+----------------------------------------
 Reporter:  marisn                 |       Owner:  grass-dev@…              
     Type:  defect                 |      Status:  new                      
 Priority:  critical               |   Milestone:  6.4.0                    
Component:  Raster                 |     Version:  svn-releasebranch64      
 Keywords:  wingrass, r.terraflow  |    Platform:  MSWindows Vista          
      Cpu:  x86-32                 |  
-----------------------------------+----------------------------------------

Comment(by mmetz):

 Replying to [comment:28 hamish]:
 >
 > patch attached for consideration. debug messages should be removed after
 testing.
 >
 The patch seems to work in combination with the later patch, results are
 identical between windows grass65, Linux grass65 patched and Linux grass65
 unpatched.

 Note that the patch for stream_len() contradicts the principle of
 r.terraflow to avoid random seek at all costs, fseek should only be called
 to reset the file pointer to the beginning of the file. Each call to the
 patched stream_len in mingw32 calls fseek twice, and stream_len itself is
 called very often as the debug messages illustrate (so often that wxGUI
 might freeze...). As a result, r.terraflow is heavily slowed down on
 windows: using elevation.10m from spearfish60 as input (2.6 million cells)
 takes with r.terraflow twice as long as with r.watershed in disk swap
 mode, and that even though all temp files also of r.terraflow are small
 enough to be cached by my test system.

 Markus M

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1006#comment:52>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list