[GRASS5] [bug #4355] (grass) GUI: r.terraflow: the window does not pop up, error printed to terminal

this bug's URL: http://intevation.de/rt/webrt?serial_num=4355
-------------------------------------------------------------------------

Subject: GUI: r.terraflow: the window does not pop up, error printed to terminal

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-04-12

in d.m:
1. Hydrologic modeling -> Flow accumulation for massive grids (r.terraflow)
2. error in the terminal:

$ r.terraflow December 2003
region size is 241 x 196

ERROR: Required parameter <elev> not set:
    (Input elevation grid).

ERROR: Required parameter <filled> not set:
    (Output (filled) elevation grid).

ERROR: Required parameter <direction> not set:
    (Output direction grid).

ERROR: Required parameter <swatershed> not set:
    (Output sinkwatershed grid).

ERROR: Required parameter <accumulation> not set:
    (Output accumulation grid).

ERROR: Required parameter <tci> not set:
    (Output tci grid).

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

Usage:
r.terraflow [-sq] elev=string filled=string direction=string
   swatershed=string accumulation=string tci=string [d8cut=value]
   [memory=value] [STREAM_DIR=string] [stats=string]

Flags:
  -s SFD (D8) flow (default is MFD)
  -q Quiet

Parameters:
          elev Input elevation grid
        filled Output (filled) elevation grid
     direction Output direction grid
    swatershed Output sinkwatershed grid
  accumulation Output accumulation grid
           tci Output tci grid
         d8cut If flow accumulation is larger than this value it is routed using SFD (D8) direction
                 (meaningfull only for MFD flow)
                 default: infinity
        memory Main memory size (in MB)
                 default: 300
    STREAM_DIR Location of intermediate STREAMs
                 default: /var/tmp
         stats Stats file
                 default: stats.out

If r.terraflow GUI is called from CLI with r.terraflow&, the window pops up, but there is still some unwnated output to the terminal:

$ r.terraflow&
r.terraflow December 2003
region size is 241 x 196

Maciek

-------------------------------------------- Managed by Request Tracker

this bug's URL: http://intevation.de/rt/webrt?serial_num=4355
---------------------------------------------------------------------

Subject: GUI: r.terraflow: the window does not pop up, error printed
to terminal

..

Changing "spawn" to "term" in gui/tcltk/d.m/menu.tcl helps it start, but
probably isn't the correct solution.

Changing to "execute" gives a tcl error (maybe informative as to the
problem)

Hamish

Hamish wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=4355
> ---------------------------------------------------------------------
>
> Subject: GUI: r.terraflow: the window does not pop up, error printed
> to terminal
..

Changing "spawn" to "term" in gui/tcltk/d.m/menu.tcl helps it start, but
probably isn't the correct solution.

Changing to "execute" gives a tcl error (maybe informative as to the
problem)

r.terraflow doesn't follow the correct startup sequence; it does some
stuff (e.g. G_get_set_window(), printing the region to stderr) before
G_parser() is called.

This will likely cause features such as --tcltk to break (Tcl's
exec/open functions will throw an exception if the process writes
anything to stderr).

--
Glynn Clements <glynn@gclements.plus.com>