[GRASS-dev] r49166 consolidating flags from r.info

Martin Landa landa.martin at gmail.com
Thu Nov 10 17:38:11 EST 2011


2011/11/10 Hamish <hamish_b at yahoo.com>:
> I am not so sure about r49166. I don't really mind about adding map type
> and res to -g to make it more like 'g.region -g', but wonder if things like
> vertical datum and data units should only export if they actually exist.

the main question here is to keep behaviour consistent across all
GRASS modules which prints info in shell script style. Basically there
are two options, the items which are not defined

1) will be printed with empty value (`datum=`)
2) will be not printed out

Speaking about Python scripts, this output is processed by
`parse_command()`, for 1) you would need to test if the item is a key
in directory; for 2) you would need to test if the value is non-empty.
Anyway this behaviour should be consistent across the all modules.
Personally I would incline to choose option 1).


Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

More information about the grass-dev mailing list