[GRASS-dev] Incorrect stuff coming through stderr?

Michael Barton Michael.Barton at asu.edu
Mon Sep 4 00:10:11 EDT 2006


> From: Hamish <hamish_nospam at yahoo.com>
> Date: Mon, 4 Sep 2006 14:16:42 +1200
> To: Michael Barton <michael.barton at asu.edu>
> Cc: <grass-dev at grass.itc.it>, <Gary.Mayer at asu.edu>
> Subject: Re: [GRASS-dev] Incorrect stuff coming through stderr?
> 
> Implement Java bindings for the SWIG interface?
> See QGIS<->GRASS module glue?

Actually, we don't even need SWIG.

> 
>> However, these become issues that range from annoyances (parsing
>> r.info) to impossibilities (parsing r.describe) when you try to use
>> GRASS from another environment than a user at a terminal.
> 
> With r.info you have a point (although extending the -g flag as
> suggested by Martin could help that). For me r.info has all the flags I
> need (because we've added them as needed...), but v.info could use a
> parsable version of lines= boundaries= etc.

But you can just get all the r.info data at once, and one flag seems to
cancel out the others, so you can't accumulate them either.

> 
> What's so hard about parsing "r.describe -q1"?

Because the output varies depending on whether the map is latlon or
projected, all positive or negative values, or some positive and some
negative values.

> 
> 
>> It seems odd to me that progress messages are written to stderr.
> 
> If you redirect stderr with "2> /dev/null" all that should be left is
> parsable output from stdout.
> 
>> We also need a "quiet" option for all commands to suppress all stdout
>> except the actual output values.
> 
> or otherwise stated, only parsable output should be sent to stdout.
> 
> 
> I agree with your basic tenet that as much functionalily as possible
> should be able to be dealt with by scripts or wrapper functions (i.e.
> generalized interoperability). I think we are well on our way to this
> already, certainly more so than the competition.
> 

I agree. It seems an opportune time to try to regularize across all of GRASS

Michael

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & 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