[GRASS-dev] Problems using pygrass' Region()

Paulo van Breugel p.vanbreugel at gmail.com
Mon Feb 16 11:12:12 PST 2015


I am trying to repeatedly change the region in a script. To get the current
region I would normally use

>>>reg1 = grass.script.region()

When using pygrass, I can also use

>>>import grass.pygrass.gis.region as region
>>>reg2 = region.Region()

The first time I run this reg1 = reg2

Now, when I change the region, and run again:

>>>reg3 = grass.script.region()

The reg3 values reflect the new region settings. However, when I run

>>>reg2 = region.Region()

The reg4 values are the same as reg2

How do I get a Region object with the current / changed region settings?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150216/61fada45/attachment.html>


More information about the grass-dev mailing list