[GRASS-dev] About the "-g" switch of g.region

Glynn Clements glynn at gclements.plus.com
Tue Jan 22 08:16:29 PST 2013


Nikos Alexandris wrote:

> Is there a reason why the output of  "g.region -cg" (in decimal degrees) is 
> not the same as the output of "g.region -c" (in D:M:S)?
> 
> The -g switch is there to "print in shell script style". Does the 
> switch/description imply, necessarily, decimal degrees?

I think it implies that the output is in a format amenable to use by
shell scripts.

DNS is primarily meant for humans; programs which aren't specifically
designed for geography or cartography won't understand DMS, so it will
have to be converted, and doing that in a shell script is messy (expr
and $((...)) only support integer arithmetic).

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


More information about the grass-dev mailing list