Ok this is the easiest way to retrieve Location and Mapset in a Script right?<div>And I can use it in a If sentence without any problems?<br><br><div class="gmail_quote">On Wed, Feb 3, 2010 at 5:39 PM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><br>
Pedro Roma wrote:<br>
<br>
> I'm developing a few scripts but a few r.mapcalc lines will depend on the<br>
> location and mapset. I mean, I will have different factors for different<br>
> Locations and mapsets.<br>
> Is there any variables with location names and mapsets?<br>
> And is it possibvle to use in if setences in GRASS Bash scripts or even in<br>
> PERL Scripts? (I suppose So)<br>
<br>
</div></div>You can query GRASS variables using g.gisenv. You can set shell<br>
variables with e.g.:<br>
<br>
MAPSET=`g.gisenv get=MAPSET`<br>
<font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></blockquote></div><br></div>