[GRASS-dev] Location and mapset name variables

Pedro Roma pedroroma1982 at gmail.com
Wed Feb 3 13:52:10 EST 2010


Ok this is the easiest way to retrieve Location and Mapset in a Script
right?
And I can use it in a If sentence without any problems?

On Wed, Feb 3, 2010 at 5:39 PM, Glynn Clements <glynn at gclements.plus.com>wrote:

>
> Pedro Roma wrote:
>
> > I'm developing a few scripts but a few r.mapcalc lines will depend on the
> > location and mapset. I mean, I will have different factors for different
> > Locations and mapsets.
> > Is there any variables with location names and mapsets?
> > And is it possibvle to use in if setences in GRASS Bash scripts or even
> in
> > PERL Scripts? (I suppose So)
>
> You can query GRASS variables using g.gisenv. You can set shell
> variables with e.g.:
>
>        MAPSET=`g.gisenv get=MAPSET`
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20100203/677dc52e/attachment.html


More information about the grass-dev mailing list