[GRASS-user] Change GRASS region multiple times

Moritz Lennert mlennert at club.worldonline.be
Thu Mar 24 03:36:22 PDT 2016


On 23/03/16 22:16, Luna, Daniel Eduardo wrote:
> Thank you very much for your response Pietro!
>
> Unfortunately, I'm still having problems with this topic: During the
> execution of my module, the resolution can change just one time.
> Then. when I'm creating multiple raster maps, they all have the
> resolution of the first one. Even using the g.region module. Is this
> normal?


Yes, just calling g.region is not enough as Pietro told you.

Check out [1] for hints on how to change region within your script. The 
first solution (use_temp_region()) generally works well for me.

Moritz

[1] 
https://grasswiki.osgeo.org/wiki/GRASS_Python_Scripting_Library#Using_temporary_region_for_computations



More information about the grass-user mailing list