winGRASS + gis.m: Progress bar [was Re: [GRASS-dev] native
winGRASS pre-alpha testers needed]
Michael Barton
michael.barton at asu.edu
Fri May 25 13:37:54 EDT 2007
Aha!
Michael
On 5/25/07 3:53 AM, "Paul Kelly" <paul-grass at stjohnspoint.co.uk> wrote:
> On Fri, 25 May 2007, Moritz Lennert wrote:
>
>> On 25/05/07 10:44, Moritz Lennert wrote:
>>>
>>> r.watershed elevation=elevation.dem at PERMANENT threshold=100 basin=basins
>>> stream=streams half.basin=half_basins visual=watershed_vis
>>>
>>
>> What is strange, however, is that when I run this command from the GUI, a
>> terminal window opens showing the progress percentages in text and not the
>> nice progress bar in the Output window of the GIS Manager.
>>
>> Any idea why ?
>
> I'd guess it is because the r.watershed binary is only really a wrapper to
> parse the options and it calls other helper programs to actually do the
> work, and these are the ones that output the progress information. I
> suppose it could be a system()/G_spawn() issue. I guess the spawned
> process needs to inherit the setting that tells it it should output
> progress information in the GUI-compatible format (is there an environment
> variable that tells it that?) and also that stderr of the spawned process
> needs to be going to the same place as that of the original r.watershed
> process so the GUI can pick it up and turn it into a progress bar.
> Probably quite complicated - at least it works at the minute.
>
> Paul
>
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
More information about the grass-dev
mailing list