[GRASS-dev] Re: [GRASS GIS] #1006: r.terraflow fails to create temp file on Windows when launched from wxgui

GRASS GIS trac at osgeo.org
Wed Mar 17 15:33:15 EDT 2010


#1006: r.terraflow fails to create temp file on Windows when launched from wxgui
------------------------------+---------------------------------------------
  Reporter:  marisn           |       Owner:  grass-dev at lists.osgeo.org 
      Type:  defect           |      Status:  new                       
  Priority:  normal           |   Milestone:  6.4.0                     
 Component:  Raster           |     Version:  svn-releasebranch64       
Resolution:                   |    Keywords:  wxgui, wingrass, terraflow
  Platform:  MSWindows Vista  |         Cpu:  x86-32                    
------------------------------+---------------------------------------------
Comment (by hellik):

 Replying to [comment:3 hamish]:
 > what does "r.terraflow --help" say ?

 {{{
 GRASS 6.4> r.terraflow --help

 Beschreibung:
  Flow computation for massive grids (Float version).

 Schlüsselwörter:
  Raster

 Benutzung:
  r.terraflow [-sq] elevation=name filled=name direction=name
    swatershed=name accumulation=name tci=name [d8cut=value]
    [memory=value] [STREAM_DIR=string] [stats=string] [--overwrite]
    [--verbose] [--quiet]

 Flags:
   -s   SFD (D8) flow (default is MFD)
   -q   schweigsam
  --o   Ausgabedateien dürfen bereits existierende Dateien überschreiben.
  --v   Detaillierter Ausgabemodus
  --q   Schweigsame Modulausgabe

 Parameter:
      elevation   Name der Höhenkarte.
         filled   Output filled (flooded) elevation raster map
      direction   Output flow direction raster map
     swatershed   Output sink-watershed raster map
   accumulation   Output flow accumulation raster map
            tci   Output topographic convergence index (tci) raster map
          d8cut   If flow accumulation is larger than this value it is
 routed using SFD (D8) direction
                  (meaningfull only  for MFD flow)
                   Standard: infinity
         memory   Maximum runtime memory size (in MB)
                   Standard: 300
     STREAM_DIR   Directory to hold temporary files (they can be large)
                   Standard: C:/Users/syringia/AppData/Local/Temp
          stats   Name of file containing runtime statistics
                   Standard: stats.out
 }}}


 >
 > (specifically the STREAM_DIR section)
 >
 >
 > {{{
 >   /* temporary STREAM path */
 >   struct Option *streamdir;
 >   streamdir = G_define_option() ;
 >   streamdir->key        = "STREAM_DIR";
 >   streamdir->type       = TYPE_STRING;
 >   streamdir->required   = NO;
 > #ifdef __MINGW32__
 >   streamdir->answer     =
 G_convert_dirseps_from_host(G_store(getenv("TEMP")));
 > #else
 >   streamdir->answer     = G_store("/var/tmp/");
 > #endif
 >   streamdir->description=
 >      _("Directory to hold temporary files (they can be large)");
 > }}}
 >
 >
 > Maris:
 > > Aaah - just noticed - could this be related to #520?
 >
 > probably not as that should be already fixed. (just not ideal)
 >
 >
 > can you try on a small (file size) raster like elevation.dem @
 Spearfish? (existing 300mb doesn't seem so bad though)

 nc-data set:

 {{{
 g.region -p -a rast=el_D782_6m at PERMANENT
 projection: 99 (Lambert Conformal Conic)
 zone:       0
 datum:      nad83
 ellipsoid:  a=6378137 es=0.006694380022900787
 north:      222504.44509601
 south:      219456.439
 west:       633985.268
 east:       637033.27409601
 nsres:      6.09601219
 ewres:      6.09601219
 rows:       500
 cols:       500
 cells:      250000
 }}}

 >
 >
 > can you try with --verbose so percent done is shown for nrows and we get
 more details?
 >
 >
 > Hamish

 {{{
 g.gisenv set=DEBUG=3
 }}}

 {{{
 r.terraflow --verbose elevation=el_D782_6m at PERMANENT filled=floodeda
 direction=dirr swatershed=swat accumulation=accr tci=topgr
 D2/3: G__read_Cell_head
 D2/3: G__read_Cell_head_array
 D3/3: region item: proj:       99
 D3/3: region item: zone:       0
 D3/3: region item: north:      222504.44509601
 D3/3: region item: south:      219456.439
 D3/3: region item: east:       637033.27409601
 D3/3: region item: west:       633985.268
 D3/3: region item: cols:       500
 D3/3: region item: rows:       500
 D3/3: region item: e-w resol:  6.09601219
 D3/3: region item: n-s resol:  6.09601219
 D3/3: region item: top:        1
 D3/3: region item: bottom:     0
 D3/3: region item: cols3:      500
 D3/3: region item: rows3:      500
 D3/3: region item: depths:     1
 D3/3: region item: e-w resol3: 6.09601219
 D3/3: region item: n-s resol3: 6.09601219
 D3/3: region item: t-b resol:  1
 D2/3: G__read_Cell_head
 D2/3: G__read_Cell_head_array
 D3/3: region item: proj:       99
 D3/3: region item: zone:       0
 D3/3: region item: north:      222504.44509601
 D3/3: region item: south:      219456.439
 D3/3: region item: east:       637033.27409601
 D3/3: region item: west:       633985.268
 D3/3: region item: cols:       500
 D3/3: region item: rows:       500
 D3/3: region item: e-w resol:  6.09601219
 D3/3: region item: n-s resol:  6.09601219
 D3/3: region item: format:     -1
 D3/3: region item: compressed: 1
 cell el_D782_6m header compatible with region header
 Elevation stored as FLOAT (4B)
 Region size is 500 x 500
 STREAM temporary files in
 C:/Users/syringia/AppData/Local/Temp  (THESE INTERMEDIATE
 STREAMS WILL NOT BE DELETED IN CASE OF ABNORMAL TERMINATION
 OF THE PROGRAM. TO SAVE SPACE PLEASE DELETE THESE FILES
 MANUALLY!)
 file stats.out exists - renaming.
 reading data from el_D782_6m to stream
 C:/Users/syringia/AppData/Local/Temp/STREAM_a05332: D2/3:
 G__read_Cell_head
 D2/3: G__read_Cell_head_array
 D3/3: region item: proj:       99
 D3/3: region item: zone:       0
 D3/3: region item: north:      222504.44509601
 D3/3: region item: south:      219456.439
 D3/3: region item: east:       637033.27409601
 D3/3: region item: west:       633985.268
 D3/3: region item: cols:       500
 D3/3: region item: rows:       500
 D3/3: region item: e-w resol:  6.09601219
 D3/3: region item: n-s resol:  6.09601219
 D3/3: region item: format:     -1
 D3/3: region item: compressed: 1
 D3/3: create window mapping (500 columns)
 MFD flow direction
 D8CUT=999999986991104.000000
 Memory size: 300.00M (314572800) bytes
 Memory manager registering memory in MM_WARN_ON_MEMORY_EXCEEDED mode.
 Assertion failed: nrows * ncols == str->stream_len(), file
 grass2str.h, line 144
 This application has requested the Runtime to terminate it
 in an unusual way.
 Please contact the application's support team for more
 information.
 }}}

 the only maybe usefull information?

 {{{
 Assertion failed: nrows * ncols == str->stream_len(), file
 grass2str.h, line 144
 }}}

 Helmut

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


More information about the grass-dev mailing list