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

Sören Gebbert soerengebbert at googlemail.com
Tue Sep 27 14:38:01 PDT 2016


Hi,

> On Sun, Sep 25, 2016 at 5:40 PM, Sören Gebbert <
>> soerengebbert at googlemail.com> wrote:
>>
>>> >r.mapclac --raster-region= --north= --south= --west= --east= --res=
>>>> >--ewres= --nsres= --vect-region --raster-align= ...
>>>>
>>>
>> I like this in the sense that if the region setting for the module is
>> something which should be managed by these extra options, then they should
>> be managed in parser, rather than introduced one by one for individual
>> modules.
>>
>> But how is this different from using GRASS_REGION? Convenience of --raster-region=?
>> Better syntax than environmental variable?
>>
>
> From my understanding, the GRASS_REGION environmental variable is
> supported by G_get_window() [1]. However, most raster modules
> uses  Rast_window_rows() and Rast_window_cols() to get the current
> computational region rows and cols. Hence, setting GRASS_REGION will not
> affect most of the raster modules.
>

While inspecting the raster and libgis code i realized that the code that
initializes the input and output raster window eventually calls
G_get_window(). Hence, the GRASS_REGION environmental variable will have an
effect on  Rast_window_rows() and Rast_window_cols(). However, the correct
use of GRASS_REGION is still unclear to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160927/57f0edbb/attachment.html>


More information about the grass-dev mailing list