Anna Petrášová wrote:

> > > How? If we change the interface, I would like to be able to also pass env
> > > to write_command.
> >
> > Do you mean passing arbitrary environment variables through
> > grass.script.mapcalc() down to the underlying r.mapcalc command?
> >
> > Which environment variables would be useful?
> 
> For example when you want to parallelize multiple r.mapcalc calls with
> different region settings. You would copy the environment, change the
> region (e.g. set WIND_OVERRIDE) or even mapset or location and pass it to
> r.mapcalc without interfering with the current environment. I can do that
> now with run_command('r.mapcalc', ..., env=myEnv), it would be just more
> convenient to have it in the grass.script.mapcalc(). In fact, the same
> applies to other wrappers in grass.script, for example raster_what.
> Currently when querying raster in the gui, the GRASS_REGION is changed to
> match the raster before the query and restored afterwards. In my opinion,
> it would be just much more elegant (and would require less code) and less
> error prone, not to change the environment globally but just for the r.what
> module.

Okay, done in r61428.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to