[GRASS-dev] g.region print flags combination

Glynn Clements glynn at gclements.plus.com
Fri Jan 5 08:04:40 EST 2007


Martin Landa wrote:

> 3) The -p flag was changed.
> 
> projection: 99 (Krovak)
> zone: 0
> datum: towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56
> 
> ->
> 
> projection : 99 (Krovak)
> zone       : 0
> datum      : towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56
> 
> Not sure what formatting is more appropriate.

Personally, I would have added the padding after the colons, i.e.:

projection:  99 (Krovak)
zone:        0
datum:       towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56

The reason being that a regexp such as "^([^:]*): *(.*)$" would still
work as before.

> 4) g.region -g X g.region -pg

Should be equivalent, IMO.

>  --- I wanted to make -g flag more
> universal, e.g. to distinguish
> 
> g.region -pcl
> g.region -cl
> 
> and
> 
> g.region -pclg instead of g.region -gcl <-- problem
> g.region -gcl <-- problem

What's the problem? That -g == -pg but -cg != -pcg?

That isn't a problem, IMHO. By making -g a synonym for -pg, you're
only affecting the behaviour of a case which would otherwise be
meaningless (the printing format doesn't matter if you don't print
anything). Several other modules have similar behaviour, and some of
it is significantly more irrational than this.

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




More information about the grass-dev mailing list