[GRASS-dev] g.region print flags combination

Maciej Sieczka tutey at o2.pl
Thu Jan 4 12:54:49 EST 2007


Martin Landa wrote:
> Hi all,
> 
> I would like to summarize all complication with the new behaviour of
> g.region. I would like also to ask you some question, to fix and close
> this issue finally;-)
> 
> 1) The -g flag can be used in combination with all print flags, e.g.
> 
> g.region -cg
> 
> I think it is without problem. There was idea to add a new flag for
> shell script style. I hope it is possible to use the -g flag for this
> work as well.
> 
> 2) It is possible to mix print flags, e.g.
> 
> g.region -pc
> 
> or for parsable output
> 
> g.region -pcg
> 
> There should not be any problem.
> 
> 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.
> 
> 4) g.region -g X g.region -pg --- 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
> 
> The question of the warning in `g.region -g` -- it can be printed at
> the end of the output or removed.
> 
> 5) New lines in shell script style output, I think this modification
> can be done in 6.x branch.
> 
> These lines can be added to the end of the output for backward
> compability -- OK?

Really cannot it wait for GRASS 7? I'm just kind of uneasy about it.
What if somebody eg. counts the number of lines in g.region -g output
for his mysterious, unknow to us, purpose, and he gets extra 4 lines?
This might sound funny ;), but it won't be funny anymore if it is real.
You never know. Better to stick to the safe side I think.

Wait, another thought - WHY should g.region print the projection info,
either in -p or -pg mode, *anyway*? Isn't ther g.proj -p for that?
Doubled functionality per se (if we also consider r.info which prints
the projection info too - a trippled fuctionality). So shouldn't this
wait for GRASS 7, where printing the projection info will be left for
g.proj [1] alone, and removed from g.region and r.info for good? And
for now, in GRASS 6, leave it as it was before - not perfect, but 100%
backwards compatible at least. Let's leave cleaning it all up together
for GRASS 7. Am I thinking any good? Paul?

[1]
propably the g.proj -j output should be extended to include all the
information output by g.proj -p, or a new "-g" flag should be
introduced, to be used in conjunction with "-p" for parseable output.

Maciek




More information about the grass-dev mailing list