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

Vaclav Petras wenzeslaus at gmail.com
Tue Sep 27 14:39:09 PDT 2016


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

> 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.
>

This would be a buggy behavior but I think it is not the case. All 2D
raster window functions use Rast__init_window() [2] which calls
G__init_window() [3] which uses G_get_window() [4]. I'm not sure about 3D
rasters but I think WIND_OVERRIDE worked for me. Display modules seems to
accept GRASS_REGION because that's actually how it is used in code. Vector
modules probably just use the G_ function.

Vaclav

[2]
https://trac.osgeo.org/grass/browser/grass/trunk/lib/raster/window.c?rev=69586
[3]
https://trac.osgeo.org/grass/browser/grass/trunk/lib/raster/set_window.c?rev=69586#L24
[4]
https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/set_window.c?rev=69586#L70



>
> Best regards
> Soeren
>
> [1] https://trac.osgeo.org/grass/browser/grass/trunk/lib/
> gis/get_window.c?rev=69586#L30
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160927/d68a4e32/attachment.html>


More information about the grass-dev mailing list