[GRASS-dev] Adding an expert mode to the parser

Vaclav Petras wenzeslaus at gmail.com
Tue Sep 27 14:52:58 PDT 2016


On Tue, Sep 27, 2016 at 5:38 PM, Sören Gebbert <soerengebbert at googlemail.com
> wrote:

> However, the correct use of GRASS_REGION is still unclear to me.


There is a function in grass.script [1] which can generate the right
string. It calls g.region with -u, so you can modify the region with
g.region, but without actually changing it. Then you just set the
environmental variable for the process. If you anyway control the
environment for the subprocess, I think, there is not much difference
between GRASS_REGION and WIND_OVERRIDE expect for a file and length of
command line.

If the g.region code is moved to library (there might be some modules which
would benefit from it) and parser accepts standard options with values,
then parser could just set this variable in the same way it sets
GRASS_OVERWRITE (to keep parser and rest of lib/gis separate - although
this might not be an option anyway if it needs to use the g.region
functions).

[1] https://grass.osgeo.org/grass70/manuals/libpython/
script.html#script.core.region_env
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160927/f6d0ffea/attachment-0001.html>


More information about the grass-dev mailing list