[GRASS-dev] pygrass: Region.set_current() doesn't work
martin.zbinden at gmail.com
Fri Jul 25 01:39:35 PDT 2014
I've come across some trouble defining the computational region from pygrass:
If I understand correctly, Region.set_current() can be used
to effectively change the region currently used by GRASS. But changing
extent of Raster()-object and executing set_current() does not have
Below is a minimal example.
Can somebody tell me if this is a bug or simply a misunderstanding from my site?
I am using GRASS GIS 7 (SVN rev 61281) on Linux Mint 17.
Thanks for any help.
minimal working example:
#-*- coding: utf-8 -*-
from grass.pygrass.gis.region import Region
from grass.pygrass.modules.shortcuts import raster as r, vector as v,
general as g, display as d
region = Region()
# here region information are still identical, Region() seems to be
initialized with current region
region.north += 100
region.east += 100
region.south -= 100
region.west -= 100
# g.region(flags='p') still shows the old region settings, not the
r.mapcalc("test = 1")
# load in QGIS, is really size of old region
3154 Rüschegg Heubach
+41 78 628 28 82
More information about the grass-dev